/* ═══════════════════════════════════════════════════
   TAIF Forms — Frontend Form Styles
   Background #1e1e1e · luxury dark/gold theme
═══════════════════════════════════════════════════ */
/* Cairo font is loaded via PHP for better performance */

.taif-form-wrap {
  --g:      #C9A96E;
  --gd:     #9E7B45;
  --gl:     #E2C99A;
  --bg:     #1e1e1e;
  --card:   #252525;
  --card2:  #2c2c2c;
  --border: rgba(201,169,110,.18);
  --bh:     rgba(201,169,110,.42);
  --off:    #E8E6E1;
  --muted:  #888;
  --light:  #B8B8B8;
  --error:  #e07a7a;
  --r:      12px;
  --t:      all .22s ease;

  background: var(--bg);
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 28px 64px;
  box-sizing: border-box;
}

.taif-form-wrap { font-family: 'Cairo', sans-serif !important; }

/* ════════════════════════════════════════════════════
   CARD
════════════════════════════════════════════════════ */
.taif-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
}

.taif-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--g);
  border-bottom: 1px solid var(--border);
  background: rgba(201,169,110,.03);
}

.taif-card-header::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, var(--gd), var(--g));
  border-radius: 2px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   CARD BODY GRID
════════════════════════════════════════════════════ */
.taif-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 24px;
}

.taif-card-body.taif-photos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 20px 24px;
}
.taif-card-body.taif-photos-grid .taif-f {
  width: calc(33.333% - 12px);
  min-width: 140px;
}

/* ── Field wrapper ── */
.taif-f {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.taif-f.taif-w-full  { grid-column: 1 / -1; }
.taif-f.taif-w-half  { grid-column: span 1; }
.taif-f.taif-w-third { grid-column: span 1; }

/* ════════════════════════════════════════════════════
   LABELS
════════════════════════════════════════════════════ */
.taif-label {
  font-size: calc(var(--taif-fs, 13.5px) * 0.78);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.taif-req { color: var(--g); margin-inline-start: 2px; }

/* ════════════════════════════════════════════════════
   INPUTS
════════════════════════════════════════════════════ */
.taif-input,
.taif-select,
.taif-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  font-size: var(--taif-fs, 13.5px);
  /* Dark theme defaults — explicit white text + white caret, locked with !important
     so external WP theme CSS and browser autofill can't override them. */
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  outline: none;
  transition: var(--t);
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
}

/* <select> ignores -webkit-text-fill-color in some browsers — enforce color directly */
.taif-select {
  color: #ffffff !important;
}

/* Prevent browser autofill from overriding text color */
.taif-input:-webkit-autofill,
.taif-input:-webkit-autofill:hover,
.taif-input:-webkit-autofill:focus,
.taif-input:-webkit-autofill:active,
.taif-textarea:-webkit-autofill,
.taif-textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--card2) inset !important;
  caret-color: #ffffff !important;
}
.taif-form-wrap[dir="rtl"] .taif-input,
.taif-form-wrap[dir="rtl"] .taif-select,
.taif-form-wrap[dir="rtl"] .taif-textarea { text-align: right; }

.taif-input::placeholder,
.taif-textarea::placeholder { color: rgba(255,255,255,.35) !important; }

.taif-input:focus,
.taif-select:focus,
.taif-textarea:focus {
  border-color: var(--g);
  background: #303030;
  box-shadow: 0 0 0 3px rgba(201,169,110,.1);
}
.taif-input.taif-err,
.taif-select.taif-err { border-color: var(--error); box-shadow: 0 0 0 3px rgba(224,122,122,.1); }

/* Select arrow */
.taif-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23888' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 36px;
  cursor: pointer;
}
.taif-form-wrap[dir="rtl"] .taif-select {
  background-position: right 14px center;
  padding-left: 14px;
  padding-right: 36px;
}
.taif-select option { background: #252525; color: #fff !important; -webkit-text-fill-color: #fff !important; }
.taif-textarea { resize: none; min-height: 80px; }

/* ════════════════════════════════════════════════════
   CHIPS (radio / checkbox)
════════════════════════════════════════════════════ */
.taif-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.taif-chips input[type="radio"],
.taif-chips input[type="checkbox"] { display: none; }
.taif-chips label {
  padding: 8px 16px;
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: calc(var(--taif-fs, 13.5px) * 0.93);
  color: var(--light);
  cursor: pointer;
  transition: var(--t);
  user-select: none;
  font-family: inherit;
  line-height: 1.4;
}
.taif-chips input:checked + label {
  background: rgba(201,169,110,.12);
  border-color: var(--g);
  color: var(--g);
}
.taif-chips label:hover { border-color: var(--bh); color: var(--gl); }

/* ── Hint / Error ── */
.taif-hint    { font-size: 11px; color: var(--muted); }
.taif-err-msg { font-size: 11px; color: var(--error); }

/* ════════════════════════════════════════════════════
   EXAMPLES SECTION
════════════════════════════════════════════════════ */
.taif-examples-wrap {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(201,169,110,0.03);
}
.taif-examples-head {
  margin-bottom: 20px;
  text-align: center;
}
.taif-examples-head strong {
  display: block;
  font-size: 14px;
  color: var(--g);
  margin-bottom: 4px;
}
.taif-examples-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.taif-examples-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 0 auto !important;
}
.taif-example-item {
  width: 64px !important;
  flex: 0 0 64px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
}
.taif-example-img {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  border: 1px solid var(--border) !important;
  background: var(--card2) !important;
}
.taif-example-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: 0.85 !important;
  display: block !important;
}
.taif-example-item:hover .taif-example-img { border-color: var(--g) !important; transform: scale(1.1) !important; z-index: 2; }
.taif-example-item:hover img { opacity: 1 !important; }
.taif-example-item small {
  font-size: 8px !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  text-align: center !important;
  line-height: 1.1 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* ════════════════════════════════════════════════════
   PHOTO UPLOAD
════════════════════════════════════════════════════ */
.taif-upload-slot { display: flex; flex-direction: column; }

.taif-upload-box {
  aspect-ratio: 1;
  background: var(--card2);
  border: 1.5px dashed var(--border);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--t);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 8px;
}

.taif-upload-box.taif-has-img::before { display: none; }


.taif-upload-box:hover  { border-color: var(--g); background: #303030; }
.taif-upload-box.taif-drag { border-color: var(--g); background: rgba(201,169,110,.06); }
.taif-upload-box.taif-has-img { border-style: solid; border-color: var(--gd); }
.taif-upload-slot.taif-upload-err .taif-upload-box {
  border-color: #e74c3c !important;
  background: rgba(231,76,60,.06);
  animation: taif-shake .35s ease-in-out;
}
.taif-upload-slot.taif-upload-err .taif-err-msg {
  display: block !important;
  color: #e74c3c;
  font-size: 11px;
  margin-top: 6px;
  text-align: center;
}
@keyframes taif-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.taif-upload-box.taif-compressing { pointer-events: none; opacity: .7; }
.taif-upload-box.taif-compressing::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0,0,0,.35) url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3e%3ccircle cx='20' cy='20' r='16' stroke='%23C9A96E' stroke-width='3' fill='none' stroke-linecap='round' stroke-dasharray='25 75'%3e%3canimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='.9s' repeatCount='indefinite'/%3e%3c/circle%3e%3c/svg%3e") center / 36px no-repeat;
  z-index: 5;
  pointer-events: none;
}


.taif-upload-ico { 
  color: var(--muted);
  margin-bottom: 4px;
  position: relative; 
  z-index: 1; 
  display: flex;
  align-items: center;
  justify-content: center;
}
.taif-upload-lbl  { font-size: 13px; font-weight: 700; color: var(--off); position: relative; z-index: 1; }

.taif-upload-hint {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
  position: relative;
  z-index: 1;
  max-width: 90%;
}

.taif-up-preview {
  display: none;
  position: absolute; inset: 0;
  border-radius: inherit; overflow: hidden;
}
.taif-up-preview img { width: 100%; height: 100%; object-fit: cover; }
.taif-up-preview.taif-show { display: block; }

.taif-rm-photo {
  position: absolute; top: 6px; inset-inline-start: 6px;
  width: 24px; height: 24px;
  background: rgba(0,0,0,.82);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--t);
  line-height: 1;
}
.taif-rm-photo:hover { background: #b03333; }

/* ════════════════════════════════════════════════════
   DOCTOR BRIEF
════════════════════════════════════════════════════ */
.taif-doctor-brief { padding: 20px 24px 24px; }

.taif-db-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.taif-db-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--g);
}
.taif-db-badge {
  font-size: 10px;
  background: rgba(201,169,110,.08);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px 12px;
  color: var(--muted);
}
.taif-db-paper {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 30px rgba(0,0,0,.5);
  position: relative;
}
.taif-db-paper::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(to bottom, transparent, transparent 37px, rgba(201,169,110,.16) 37px, rgba(201,169,110,.16) 38px);
  background-position: 0 52px;
  pointer-events: none;
}
.taif-db-topbar {
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: #444;
  position: relative; z-index: 1;
  font-family: 'Cairo', sans-serif;
}
.taif-db-textarea {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 38px;
  padding: 14px 20px 10px;
  min-height: 200px;
  position: relative; z-index: 1;
  font-family: 'Cairo', sans-serif;
}
.taif-form-wrap[dir="rtl"] .taif-db-textarea { direction: rtl; text-align: right; }
.taif-form-wrap[dir="ltr"] .taif-db-textarea { direction: ltr; text-align: left; }
.taif-db-textarea::placeholder { color: #bbb; font-style: italic; font-size: 13px; font-weight: 400; }
.taif-db-count {
  display: block;
  font-size: 10.5px;
  color: #aaa;
  text-align: end;
  padding: 0 20px 6px;
  position: relative; z-index: 1;
  font-family: 'Cairo', sans-serif;
}
.taif-db-footer {
  background: #f7f7f7;
  border-top: 1px solid #e8e8e8;
  padding: 12px 20px;
  position: relative; z-index: 1;
  display: flex;
  justify-content: flex-end;
}
.taif-db-footer small {
  font-size: 10px; color: #aaa; letter-spacing: .06em;
  text-transform: uppercase; display: block; margin-bottom: 4px;
  font-family: 'Cairo', sans-serif;
}
.taif-db-sig-line { width: 160px; border-bottom: 1.5px solid #ccc; height: 24px; }

/* ════════════════════════════════════════════════════
   CONSENT
════════════════════════════════════════════════════ */
.taif-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  cursor: pointer;
  transition: var(--t);
  margin: 6px 0 16px;
}
.taif-consent:hover { border-color: var(--bh); }
.taif-consent.taif-checked { border-color: var(--gd); background: rgba(201,169,110,.06); }

.taif-chk-box {
  width: 20px; height: 20px; min-width: 20px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--card2);
  display: flex; align-items: center; justify-content: center;
  color: #000;
  transition: var(--t);
}
.taif-consent.taif-checked .taif-chk-box { background: var(--g); border-color: var(--g); }
.taif-consent p { font-size: 12.5px; color: var(--light); line-height: 1.7; margin: 0; }
.taif-consent a { color: var(--g); text-decoration: none; }

/* ════════════════════════════════════════════════════
   ERROR BANNER
════════════════════════════════════════════════════ */
.taif-err-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(224,122,122,.1);
  border: 1px solid rgba(224,122,122,.3);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--error);
  margin-bottom: 14px;
}

/* ════════════════════════════════════════════════════
   SUBMIT BUTTON
   High-specificity rules + !important override theme/
   Elementor button resets that hide the text color.
════════════════════════════════════════════════════ */
.taif-form-wrap .taif-submit-btn,
.taif-form-wrap button.taif-submit-btn {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--gd), var(--g)) !important;
  color: #1a1a1a !important;
  font-family: 'Cairo', sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: .06em;
  border: none !important;
  border-radius: var(--r);
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px;
  transition: var(--t);
  box-shadow: 0 4px 22px rgba(201,169,110,.28);
  text-decoration: none !important;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.taif-form-wrap .taif-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,169,110,.42);
}
.taif-form-wrap .taif-submit-btn:active { transform: translateY(0); }
.taif-form-wrap .taif-submit-btn:disabled {
  opacity: .6; cursor: not-allowed; transform: none;
}

/* Force text span to always be visible regardless of theme resets */
.taif-form-wrap .taif-submit-btn .taif-btn-txt {
  color: #1a1a1a !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  font-family: 'Cairo', sans-serif !important;
  line-height: 1.3 !important;
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
}


.taif-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(0,0,0,.25);
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: taif-spin .65s linear infinite;
  flex-shrink: 0;
}
@keyframes taif-spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════
   SUCCESS SCREEN
════════════════════════════════════════════════════ */
.taif-success {
  text-align: center;
  padding: 60px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.taif-success-ico {
  position: relative;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--gd), var(--g));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #000;
  margin: 0 auto 24px;
  will-change: transform;
}
/* GPU-accelerated rings via pseudo-elements — no box-shadow paint on each frame */
.taif-success-ico::before,
.taif-success-ico::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}
.taif-success-ico::before {
  inset: -14px;
  background: rgba(201,169,110,.12);
  animation: taif-pulse 2s ease infinite;
}
.taif-success-ico::after {
  inset: -28px;
  background: rgba(201,169,110,.06);
  animation: taif-pulse 2s ease infinite .25s;
}
@keyframes taif-pulse {
  0%,100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.2); opacity: .4; }
}
.taif-success h2 { font-size: 26px; font-weight: 700; color: var(--off); margin: 0 0 12px; }
.taif-success p  { font-size: 15px; color: var(--light); line-height: 1.7; max-width: 400px; margin: 0 auto 28px; }
.taif-ref-box {
  display: inline-block;
  background: rgba(201,169,110,.07);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 40px;
}
.taif-ref-box small  { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.taif-ref-box strong { font-size: 24px; color: var(--g); letter-spacing: .1em; }

/* ════════════════════════════════════════════════════
   LIGHT THEME  [data-theme="light"]
════════════════════════════════════════════════════ */
.taif-form-wrap[data-theme="light"] {
  --bg:     #F5F2EC;
  --card:   #FFFFFF;
  --card2:  #F0EDE7;
  --border: #DDD5C3;
  --bh:     rgba(158,123,69,.55);
  --off:    #1D2027;
  --muted:  #7A746B;
  --light:  #968E83;
  --error:  #c0392b;
}

.taif-form-wrap[data-theme="light"] .taif-input,
.taif-form-wrap[data-theme="light"] .taif-select,
.taif-form-wrap[data-theme="light"] .taif-textarea {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  caret-color: #000000 !important;
  color-scheme: light;
}

.taif-form-wrap[data-theme="light"] .taif-input:-webkit-autofill,
.taif-form-wrap[data-theme="light"] .taif-input:-webkit-autofill:hover,
.taif-form-wrap[data-theme="light"] .taif-input:-webkit-autofill:focus,
.taif-form-wrap[data-theme="light"] .taif-input:-webkit-autofill:active,
.taif-form-wrap[data-theme="light"] .taif-textarea:-webkit-autofill,
.taif-form-wrap[data-theme="light"] .taif-textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #000000 !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--card2) inset !important;
  caret-color: #000000 !important;
}

.taif-form-wrap[data-theme="light"] .taif-input::placeholder,
.taif-form-wrap[data-theme="light"] .taif-textarea::placeholder { color: #999999 !important; }

.taif-form-wrap[data-theme="light"] .taif-input:focus,
.taif-form-wrap[data-theme="light"] .taif-select:focus,
.taif-form-wrap[data-theme="light"] .taif-textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(158,123,69,.12);
}

.taif-form-wrap[data-theme="light"] .taif-select option { background: #fff; color: #1D2027; }

.taif-form-wrap[data-theme="light"] .taif-upload-box:hover { background: #E8E3DB; }
.taif-form-wrap[data-theme="light"] .taif-upload-box.taif-drag { background: rgba(201,169,110,.1); }

.taif-form-wrap[data-theme="light"] .taif-rm-photo { background: rgba(0,0,0,.55); }

.taif-form-wrap[data-theme="light"] .taif-success { background: #fff; }
.taif-form-wrap[data-theme="light"] .taif-success h2 { color: var(--off); }
.taif-form-wrap[data-theme="light"] .taif-success p  { color: var(--muted); }
.taif-form-wrap[data-theme="light"] .taif-ref-box strong { color: var(--gd); }

/* ════════════════════════════════════════════════════
   TRANSPARENT THEME  [data-theme="transparent"]
════════════════════════════════════════════════════ */
.taif-form-wrap[data-theme="transparent"] {
  --bg:     transparent;
  --card:   transparent;
  --card2:  rgba(255,255,255,0.05);
  --border: rgba(201,169,110,.22);
  --bh:     rgba(201,169,110,.45);
  --off:    inherit;
  --muted:  rgba(128,128,128,.9);
  --light:  rgba(180,180,180,.9);
  --error:  #e07a7a;
  background: transparent !important;
  padding: 0;
}

.taif-form-wrap[data-theme="transparent"] .taif-card {
  background: transparent !important;
  border-color: var(--border) !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-card-header {
  background: transparent !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-input,
.taif-form-wrap[data-theme="transparent"] .taif-select,
.taif-form-wrap[data-theme="transparent"] .taif-textarea {
  background: rgba(255,255,255,0.06) !important;
  border-color: var(--border) !important;
  /* Transparent theme is designed for dark hero embeds — lock text to white
     so it stays readable regardless of the parent page's inherited color. */
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-input::placeholder,
.taif-form-wrap[data-theme="transparent"] .taif-textarea::placeholder {
  color: rgba(255,255,255,.4) !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-input:-webkit-autofill,
.taif-form-wrap[data-theme="transparent"] .taif-input:-webkit-autofill:hover,
.taif-form-wrap[data-theme="transparent"] .taif-input:-webkit-autofill:focus,
.taif-form-wrap[data-theme="transparent"] .taif-textarea:-webkit-autofill {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px rgba(30,30,30,.92) inset !important;
  caret-color: #ffffff !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-input:focus,
.taif-form-wrap[data-theme="transparent"] .taif-select:focus,
.taif-form-wrap[data-theme="transparent"] .taif-textarea:focus {
  background: rgba(255,255,255,0.10) !important;
  box-shadow: 0 0 0 3px rgba(201,169,110,.12) !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-chips label {
  background: rgba(255,255,255,0.06) !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-upload-box {
  background: rgba(255,255,255,0.04) !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-upload-box:hover {
  background: rgba(255,255,255,0.08) !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-consent {
  background: transparent !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-examples-wrap {
  background: transparent !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-example-img {
  background: rgba(255,255,255,0.06) !important;
}

.taif-form-wrap[data-theme="transparent"] .taif-success {
  background: transparent !important;
  border-color: var(--border) !important;
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 768px) {
  .taif-form-wrap   { padding: 28px 18px 50px; }
  .taif-card-header { padding: 13px 20px; }
  .taif-card-body   { padding: 20px; gap: 16px; }
  .taif-card-body.taif-photos-grid { gap: 14px; }
  .taif-card-body.taif-photos-grid .taif-f { width: calc(50% - 8px); }
}

/* Mobile */
@media (max-width: 520px) {
  .taif-form-wrap { padding: 16px 12px calc(80px + env(safe-area-inset-bottom, 0px)); }

  .taif-card-body {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
  }
  .taif-f.taif-w-full,
  .taif-f.taif-w-half { grid-column: 1 / -1; }

  /* Photos always stay 2-column on mobile */
  .taif-card-body.taif-photos-grid {
    padding: 14px 16px;
    gap: 10px;
  }
  .taif-card-body.taif-photos-grid .taif-f { width: calc(50% - 6px); }

  .taif-card-header { padding: 12px 16px; font-size: 10px; }
  .taif-doctor-brief { padding: 14px 16px 18px; }
  .taif-db-topbar { flex-direction: column; gap: 2px; }

  .taif-chips label { padding: 7px 12px; font-size: 12px; }
  .taif-form-wrap .taif-submit-btn { font-size: 15px !important; padding: 18px 20px !important; margin-bottom: 20px; }
}

/* ════════════════════════════════════════════════════
   THANK YOU PAGE  [taif_thankyou]
════════════════════════════════════════════════════ */
.taif-ty-wrap {
  background: #1e1e1e;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
  position: relative;
  overflow: hidden;
}

/* Ambient glow */
.taif-ty-wrap::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(201,169,110,.1) 0%, transparent 70%);
  pointer-events: none;
}

.taif-ty-container {
  max-width: 560px;
  width: 100%;
  text-align: center;
  position: relative; z-index: 1;
}

/* Brand mark */
.taif-ty-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3em;
  color: #C9A96E;
  text-transform: uppercase;
  margin-bottom: 40px;
  opacity: .7;
}

/* Check circle */
.taif-ty-icon {
  position: relative;
  width: 90px; height: 90px;
  background: linear-gradient(135deg, #9E7B45, #C9A96E);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 32px;
  will-change: transform;
}
.taif-ty-icon::before,
.taif-ty-icon::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}
.taif-ty-icon::before {
  inset: -16px;
  background: rgba(201,169,110,.1);
  animation: taif-ty-pulse 2.4s ease infinite;
}
.taif-ty-icon::after {
  inset: -32px;
  background: rgba(201,169,110,.05);
  animation: taif-ty-pulse 2.4s ease infinite .3s;
}
@keyframes taif-ty-pulse {
  0%,100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.2); opacity: .4; }
}
.taif-ty-icon svg { width: 40px; height: 40px; }

/* Title */
.taif-ty-title {
  font-size: 32px;
  font-weight: 700;
  color: #E8E6E1;
  margin: 0 0 10px;
  line-height: 1.2;
}
.taif-ty-subtitle {
  font-size: 15px;
  color: #888;
  margin: 0 0 32px;
  line-height: 1.7;
}

/* Reference box */
.taif-ty-ref {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #252525;
  border: 1px solid rgba(201,169,110,.2);
  border-radius: 14px;
  padding: 18px 48px;
  margin-bottom: 36px;
}
.taif-ty-ref small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #666;
  margin-bottom: 6px;
}
.taif-ty-ref strong {
  font-size: 26px;
  font-weight: 700;
  color: #C9A96E;
  letter-spacing: .12em;
}

/* Steps */
.taif-ty-steps {
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
  justify-content: center;
}
.taif-ty-step {
  flex: 1;
  max-width: 160px;
  background: #252525;
  border: 1px solid rgba(201,169,110,.12);
  border-radius: 12px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.taif-ty-step-num {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #9E7B45, #C9A96E);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}
.taif-ty-step-text {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
  text-align: center;
}

/* WhatsApp button */
.taif-ty-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  transition: all .22s ease;
  box-shadow: 0 4px 20px rgba(37,211,102,.25);
  margin-bottom: 20px;
}
.taif-ty-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,.38);
  color: #fff;
}
.taif-ty-wa svg { width: 22px; height: 22px; flex-shrink: 0; }

/* Back link */
.taif-ty-back {
  display: block;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  transition: color .2s;
  margin-top: 8px;
}
.taif-ty-back:hover { color: #C9A96E; }

/* RTL thank you */
.taif-ty-wrap { font-family: 'Cairo', sans-serif !important; }

/* Thank you responsive */
@media (max-width: 520px) {
  .taif-ty-steps { flex-direction: column; align-items: center; }
  .taif-ty-step  { max-width: 100%; width: 100%; flex-direction: row; text-align: start; }
  .taif-ty-step-text { text-align: start; }
  .taif-ty-title { font-size: 26px; }
  .taif-ty-ref   { padding: 16px 32px; }
  .taif-ty-ref strong { font-size: 22px; }
}
