/* Idealist Agency — site-wide "Book a call" popup.
 * Loaded on every page. Scoped to .ia-popup so it can't affect anything else.
 * Open it from anywhere with a link to  #book-call  (see inc/popup.php). */

.ia-popup { --navy: #0f1923; --accent: #c8a96e; --accent-light: #e8d5b0; --bg: #ffffff; --border: #e2e8ed; --text: #1a2736; --text-soft: #4a5d6e; --radius-lg: 18px; }
.ia-popup .popup-overlay { position: fixed; inset: 0; z-index: 9998; background: rgba(15,25,35,0.75); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 1.5rem; }
.ia-popup .popup-overlay.open { display: flex; }
.ia-popup .popup-box { background: var(--bg); border-radius: var(--radius-lg); width: 100%; max-width: 540px; box-shadow: 0 32px 80px rgba(0,0,0,0.3); overflow: hidden; position: relative; animation: popIn 0.35s cubic-bezier(0.4,0,0.2,1); }
@keyframes popIn { from { opacity:0; transform: scale(0.94) translateY(16px); } to { opacity:1; transform: scale(1) translateY(0); } }
.ia-popup .popup-header { background: var(--navy); padding: 2rem 2rem 1.6rem; position: relative; }
.ia-popup .popup-close { position: absolute; top: 1rem; right: 1rem; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.6); font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.ia-popup .popup-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.ia-popup .popup-eyebrow { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.ia-popup .popup-header h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: #fff; line-height: 1.25; }
.ia-popup .popup-header p { font-size: 0.82rem; color: rgba(255,255,255,0.45); margin-top: 0.4rem; }
.ia-popup .popup-body { padding: 1.8rem 2rem 2rem; }
.ia-popup .popup-note { font-size: 0.72rem; color: var(--text-soft); text-align: center; margin-top: 0.75rem; opacity: 0.7; }
/* Contact Form 7 inside the popup (when a form shortcode is used) */
.ia-popup .popup-cf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.ia-popup .popup-cf7 select,
.ia-popup .popup-cf7 textarea { width: 100%; padding: 0.75rem 0.9rem; border: 1.5px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 0.9rem; color: var(--text); background: #fff; }
.ia-popup .popup-cf7 textarea { min-height: 90px; resize: vertical; }
.ia-popup .popup-cf7 input:focus, .ia-popup .popup-cf7 textarea:focus, .ia-popup .popup-cf7 select:focus { outline: none; border-color: var(--accent); }
.ia-popup .popup-cf7 input[type="submit"] { width: 100%; background: var(--accent); color: var(--navy); border: none; padding: 1rem; border-radius: 8px; font-weight: 700; font-size: 0.95rem; cursor: pointer; font-family: inherit; }
.ia-popup .popup-cf7 p { margin: 0; }
.ia-popup .popup-cf7 .wpcf7-form-control-wrap { display: block; }

.ia-popup .popup-box { max-height: calc(100vh - 3rem); overflow-y: auto; }
.ia-popup .popup-cf7 .wpcf7-not-valid-tip { font-size: 0.75rem; color: #dc2626; margin: -0.6rem 0 0.8rem; display: block; }
.ia-popup .popup-cf7 .wpcf7-response-output { margin: 1rem 0 0 !important; padding: 0.75rem 1rem !important; border-radius: 8px; font-size: 0.85rem; }
.ia-popup .popup-cf7 .wpcf7-spinner { display: block; margin: 0.75rem auto 0; }
.ia-popup .popup-cf7 input[type="submit"]:hover { box-shadow: 0 8px 24px rgba(200,169,110,0.35); }
.ia-popup .popup-empty { font-size: 0.9rem; color: var(--text-soft); text-align: center; }
@media (max-width: 600px) {
  .ia-popup .popup-header { padding: 1.6rem 1.4rem 1.3rem; }
  .ia-popup .popup-body { padding: 1.4rem; }
}

/* ── Thank-you state (shown in place of the form after it is sent) ── */
.ia-popup .popup-success[hidden] { display: none; }
.ia-popup .popup-success { text-align: center; padding: 1.5rem 0.5rem 0.5rem; animation: popIn 0.35s ease; }
.ia-popup .popup-success-icon { font-size: 3rem; margin-bottom: 1rem; line-height: 1; }
.ia-popup .popup-success h4 { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 0.6rem; }
.ia-popup .popup-success p { font-size: 0.92rem; color: var(--text-soft); line-height: 1.7; max-width: 380px; margin: 0 auto; }
.ia-popup .popup-success-close { margin-top: 1.6rem; background: none; border: 1.5px solid var(--border); color: var(--text-soft); padding: 0.65rem 1.8rem; border-radius: 8px; font-family: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.ia-popup .popup-success-close:hover { border-color: var(--accent); color: var(--navy); }
.ia-popup .popup-cf7 input[type="submit"]:disabled { opacity: 0.65; cursor: wait; }
.ia-popup .popup-cf7 .wpcf7-not-valid { border-color: #dc2626 !important; }
.ia-popup .popup-cf7 .ia-form-error { margin-top: 0.9rem; padding: 0.75rem 1rem; border-radius: 8px; border: 1.5px solid #dc2626; color: #b91c1c; font-size: 0.85rem; background: #fef2f2; }