/* Aztec AI Suite — WordPress Plugin Styles v1.3 */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --az-brick:        #C0392B;
  --az-brick-dark:   #922B21;
  --az-brick-light:  #E74C3C;
  --az-gold:         #D4A017;
  --az-gold-light:   #F0C040;
  --az-concrete:     #2C2C2C;
  --az-concrete-mid: #3D3D3D;
  --az-concrete-lt:  #555555;
  --az-dust:         #F5F0E8;
  --az-dust-dark:    #E8E0D0;
  --az-white:        #FAFAF8;
  --az-success:      #27AE60;
  --az-warning:      #F39C12;
}

.aztec-ai-suite *,
.aztec-ai-suite *::before,
.aztec-ai-suite *::after { box-sizing: border-box; margin: 0; padding: 0; }

.aztec-ai-suite {
  font-family: 'DM Sans', sans-serif;
  max-width: 860px;
  margin: 0 auto;
  background: var(--az-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,0.12);
}

/* ── Header ── */
.az-header {
  background: var(--az-brick);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--az-gold);
}
.az-header::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.04) 10px, rgba(0,0,0,0.04) 11px);
  pointer-events: none;
}
.az-header-icon {
  width: 42px; height: 42px;
  background: var(--az-gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative; z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  grid-row: 1 / 3;
  grid-column: 1;
}
.az-header-text {
  position: relative; z-index: 1;
  grid-row: 1;
  grid-column: 2;
}
.az-header-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: var(--az-white);
  letter-spacing: 2px;
  line-height: 1;
  white-space: nowrap;
}
.az-header-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
  white-space: nowrap;
}
.az-header-phone {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--az-white);
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
  grid-row: 1 / 3;
  grid-column: 3;
}
.az-header-phone:hover { background: rgba(255,255,255,0.25); color: var(--az-white); }

/* ── Tabs ── */
.az-tabs {
  display: flex;
  background: var(--az-concrete);
  border-bottom: 3px solid var(--az-concrete-mid);
}
.az-tab-btn {
  flex: 1;
  padding: 14px 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1.2px;
  cursor: pointer;
  transition: all 0.18s;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1.2;
}
.az-tab-btn:hover { color: rgba(255,255,255,0.8); }
.az-tab-btn.active { color: var(--az-gold); border-bottom-color: var(--az-gold); }
.az-tab-btn .tab-icon { font-size: 20px; }

/* ── Panel wrapper ── */
.az-panels { background: var(--az-dust); }
.az-panel { display: none; padding: 20px 16px; }
.az-panel.active { display: block; }

/* ── Inputs ── */
.az-input {
  width: 100%;
  padding: 11px 13px;
  font-size: 16px; /* prevents iOS zoom */
  font-family: 'DM Sans', sans-serif;
  background: var(--az-white);
  border: 1.5px solid #ddd;
  border-radius: 4px;
  color: var(--az-concrete);
  outline: none;
  transition: border-color 0.18s;
  appearance: none;
  -webkit-appearance: none;
}
.az-input:focus { border-color: var(--az-brick); }
.az-input::placeholder { color: #bbb; }

/* ── Form grid ── */
.az-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.az-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.az-full   { grid-column: 1 / -1; }

.az-field { display: flex; flex-direction: column; gap: 6px; }
.az-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--az-concrete-lt);
}

/* ── Buttons ── */
.az-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  border-radius: 4px;
  border: none; cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  width: 100%;
}
.az-btn-primary { background: var(--az-brick); color: #fff; }
.az-btn-primary:hover { background: var(--az-brick-dark); color: #fff; }
.az-btn-secondary { background: var(--az-concrete); color: #fff; }
.az-btn-secondary:hover { background: var(--az-concrete-lt); color: #fff; }
.az-btn-ghost { background: transparent; color: var(--az-brick); border: 1.5px solid var(--az-brick); }
.az-btn-ghost:hover { background: var(--az-brick); color: #fff; }
.az-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Section card ── */
.az-card {
  background: var(--az-white);
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  margin-bottom: 12px;
}
.az-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 1.5px;
  color: var(--az-concrete);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--az-gold);
  display: inline-block;
}

/* ── Calendar ── */
.az-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.az-cal-month {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px; letter-spacing: 1px;
  color: var(--az-concrete);
}
.az-cal-arrow {
  background: none; border: 1.5px solid #ddd;
  border-radius: 4px; padding: 4px 10px;
  cursor: pointer; font-size: 14px; color: var(--az-concrete-lt);
  transition: all 0.15s;
}
.az-cal-arrow:hover { border-color: var(--az-brick); color: var(--az-brick); }
.az-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.az-cal-hdr { font-size: 10px; font-weight: 600; text-align: center; color: #aaa; padding: 3px 0; text-transform: uppercase; }
.az-cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 13px; border-radius: 4px; cursor: pointer;
  color: var(--az-concrete); border: 1.5px solid transparent;
  transition: all 0.13s;
}
.az-cal-day:hover:not(.empty):not(.past):not(.weekend) { background: var(--az-dust-dark); border-color: #ddd; }
.az-cal-day.today { border-color: var(--az-brick); font-weight: 600; }
.az-cal-day.selected { background: var(--az-brick); color: #fff; border-color: var(--az-brick); }
.az-cal-day.past, .az-cal-day.weekend { color: #ccc; cursor: default; }
.az-cal-day.empty { cursor: default; }

/* ── Time slots — now a select dropdown ── */
.az-times { margin-top: 4px; }

/* ── Confirm box ── */
.az-confirm {
  display: none;
  background: #F0FFF5;
  border: 1.5px solid #A8DFBD;
  border-radius: 6px;
  padding: 16px;
  margin-top: 14px;
}
.az-confirm.show { display: block; }
.az-confirm-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; letter-spacing: 1px;
  color: var(--az-success);
  margin-bottom: 8px;
}
.az-confirm-detail { font-size: 13px; color: #444; line-height: 1.7; margin-bottom: 14px; }

/* ── Upload zone ── */
.az-upload-zone {
  border: 2px dashed #ccc;
  border-radius: 6px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  position: relative;
  background: var(--az-white);
  transition: all 0.18s;
}
.az-upload-zone:hover, .az-upload-zone.dragover { border-color: var(--az-brick); background: #FFF8F7; }
.az-upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.az-upload-icon { font-size: 36px; color: #ccc; margin-bottom: 10px; }
.az-upload-txt { font-size: 14px; color: #666; }
.az-upload-hint { font-size: 12px; color: #aaa; margin-top: 5px; }

/* ── Image preview ── */
.az-preview { position: relative; border-radius: 6px; overflow: hidden; display: none; margin-top: 12px; }
.az-preview.show { display: block; }
.az-preview img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.az-preview-clear {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.55); color: #fff;
  border: none; border-radius: 50%;
  width: 30px; height: 30px;
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ── Analysis result ── */
.az-analysis { display: none; margin-top: 14px; }
.az-analysis.show { display: block; }
.az-severity-wrap { margin-bottom: 14px; }
.az-severity-row { display: flex; justify-content: space-between; font-size: 12px; color: #666; margin-bottom: 5px; }
.az-severity-track { height: 9px; background: #eee; border-radius: 99px; overflow: hidden; }
.az-severity-fill { height: 100%; border-radius: 99px; transition: width 0.8s cubic-bezier(0.16,1,0.3,1); }
.az-finding { display: flex; gap: 9px; font-size: 13px; color: var(--az-concrete); margin-bottom: 7px; line-height: 1.55; }
.az-finding-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--az-brick); flex-shrink: 0; margin-top: 5px; }
.az-rec-box { background: #FFF5F5; border-left: 3px solid var(--az-brick); padding: 10px 14px; border-radius: 0 4px 4px 0; font-size: 13px; color: var(--az-concrete); line-height: 1.6; margin-top: 10px; }

/* ── Quote preview ── */
.az-quote-preview { display: none; margin-top: 16px; border: 1.5px solid #ddd; border-radius: 6px; overflow: hidden; }
.az-quote-preview.show { display: block; }
.az-quote-hdr { background: var(--az-brick); color: #fff; padding: 16px 18px; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.az-quote-logo { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 2px; }
.az-quote-sub { font-size: 11px; opacity: 0.7; margin-top: 3px; }
.az-gold-bar { height: 4px; background: var(--az-gold); }
.az-quote-body { padding: 18px; background: #fff; }
.az-quote-section { margin-bottom: 16px; }
.az-quote-section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #aaa; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 10px; }
.az-quote-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.az-quote-key { color: #888; }
.az-quote-val { font-weight: 500; text-align: right; max-width: 60%; }
.az-quote-total-row { display: flex; justify-content: space-between; border-top: 1.5px solid #eee; padding-top: 10px; margin-top: 6px; }
.az-quote-total-label { font-size: 14px; font-weight: 600; }
.az-quote-total-val { font-size: 22px; font-weight: 700; color: var(--az-brick); font-family: 'Bebas Neue', sans-serif; letter-spacing: 1px; }
.az-quote-footer { font-size: 11px; color: #aaa; text-align: center; margin-top: 14px; line-height: 1.6; }
.az-status-chip { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; display: inline-block; }
.chip-estimate { background: #FFF3CD; color: #856404; }

/* ── Loading spinner ── */
.az-loading { display: none; align-items: center; gap: 10px; font-size: 13px; color: #888; padding: 12px 0; }
.az-loading.show { display: flex; }
.az-spinner { width: 18px; height: 18px; border: 2px solid #eee; border-top-color: var(--az-brick); border-radius: 50%; animation: az-spin 0.7s linear infinite; flex-shrink: 0; }
@keyframes az-spin { to { transform: rotate(360deg); } }

/* ── Status message ── */
.az-status-msg { font-size: 12px; color: #e74c3c; margin-top: 6px; min-height: 18px; }

/* ── Footer bar ── */
.az-footer { background: var(--az-concrete); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.az-footer-txt { font-size: 11px; color: rgba(255,255,255,0.4); }
.az-footer-cta { background: var(--az-gold); color: var(--az-concrete); padding: 7px 18px; border-radius: 3px; font-family: 'Bebas Neue', sans-serif; font-size: 15px; letter-spacing: 1px; text-decoration: none; transition: background 0.18s; }
.az-footer-cta:hover { background: var(--az-gold-light); color: var(--az-concrete); }

/* ── Utility ── */
.az-mt { margin-top: 14px; }
.az-flex-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.az-empty { text-align: center; padding: 28px 0; color: #bbb; font-size: 13px; }
.az-empty-icon { font-size: 34px; margin-bottom: 8px; }

/* ── Desktop: side-by-side grids ── */
@media (min-width: 600px) {
  .az-panel { padding: 24px; }
  .az-btn { width: auto; }
  .az-flex-gap { flex-direction: row; }
}

/* ── Mobile ── */
@media (max-width: 599px) {
  /* grids → single column */
  .az-grid-2, .az-grid-3 { grid-template-columns: 1fr !important; }

  /* footer stack */
  .az-footer { flex-direction: column; text-align: center; }
  .az-footer-cta { width: 100%; text-align: center; padding: 10px; }

  /* quote header stack */
  .az-quote-hdr { flex-direction: column; }
}

@media print {
  .aztec-ai-suite .az-header,
  .aztec-ai-suite .az-tabs,
  .az-panel:not(#az-panel-quote) { display: none !important; }
  #az-panel-quote { display: block !important; }
  .az-btn { display: none !important; }
}

/* ═══════════════════════════════════════════
   v1.3.1 FIXES
═══════════════════════════════════════════ */

/* Phone button — always visible, gold on mobile */
.az-header-phone {
  background: var(--az-gold) !important;
  border-color: var(--az-gold) !important;
  color: var(--az-concrete) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.az-header-phone:hover {
  background: var(--az-gold-light) !important;
  color: var(--az-concrete) !important;
}

/* Bigger fonts across the board */
.az-card-title    { font-size: 17px !important; }
.az-label         { font-size: 12px !important; }
.az-input         { font-size: 16px !important; }
.az-tab-btn       { font-size: 13px !important; letter-spacing: 1px !important; }
.az-confirm-detail{ font-size: 15px !important; line-height: 1.8 !important; }
.az-finding       { font-size: 14px !important; }
.az-rec-box       { font-size: 14px !important; }
#az-assessment-txt{ font-size: 15px !important; }

/* Header subtitle bigger */
.az-header-sub    { font-size: 12px !important; }
.az-header-title  { font-size: 24px !important; }

/* ── PRINT — show only the quote card ── */
@media print {
  /* Hide everything on the page except the quote preview */
  body > *                          { display: none !important; }
  .aztec-ai-suite                   { display: block !important; box-shadow: none !important; border-radius: 0 !important; }
  .az-header,
  .az-tabs,
  .az-panels > .az-panel:not(#az-panel-quote),
  #az-panel-quote > .az-card,
  #az-panel-quote > .az-btn,
  #az-panel-quote > .az-loading,
  .az-mt,
  .az-footer                        { display: none !important; }
  #az-panel-quote                   { display: block !important; padding: 0 !important; }
  .az-quote-preview                 { display: block !important; border: none !important; margin: 0 !important; }
  .az-quote-hdr                     { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .az-gold-bar                      { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .az-quote-body .az-mt             { display: none !important; }
  .az-btn                           { display: none !important; }
}

/* ── v1.3.2: Calendar size fix for desktop ── */
@media (min-width: 600px) {
  .az-cal-grid {
    max-width: 420px;
    margin: 0 auto;
  }
  .az-cal-day {
    aspect-ratio: unset !important;
    height: 42px;
    font-size: 14px;
  }
  .az-cal-hdr {
    font-size: 11px;
    padding: 4px 0;
  }
  .az-cal-nav {
    max-width: 420px;
    margin: 0 auto 10px;
  }
}
