/* ================================================================
   offer.css — styles for offer detail page components
   Agent card, inquiry modal, FAB bottom sheet
   ================================================================ */

/* ── Agent card ─────────────────────────────────────────────── */
.agent-profile {
    display: flex; align-items: center; gap: 14px;
    position: relative; margin-bottom: 12px;
}
.agent-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 2.5px solid #e2e8f0;
}
.agent-avatar-initials {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg,#6366f1,#8b5cf6);
    color: #fff; font-size: 26px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2.5px solid #e2e8f0;
}
.agent-online-dot {
    position: absolute; left: 46px; top: 46px;
    width: 14px; height: 14px; border-radius: 50%;
    background: #10b981; border: 2.5px solid #fff;
}
.agent-info { display: flex; flex-direction: column; gap: 2px; }
.agent-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #64748b; }
.agent-name  { font-size: 17px; font-weight: 800; color: #0f172a; line-height: 1.2; }
.agent-role  { font-size: 13px; color: #64748b; font-weight: 500; }

.agent-chat {
    position: relative; opacity: 0;
    transform: translateY(6px);
    transition: opacity .4s ease, transform .4s ease;
    margin-bottom: 12px;
}
.agent-chat.visible { opacity: 1; transform: translateY(0); }
.agent-chat-bubble {
    background: #f1f5f9; border-radius: 0 14px 14px 14px;
    padding: 12px 16px; font-size: 14px; font-weight: 500;
    line-height: 1.5; color: #1e293b;
    position: relative; min-height: 46px;
    display: flex; align-items: center;
}
.typing-dots {
    display: none; align-items: center; gap: 4px;
    position: absolute; left: 16px;
}
.typing-dots span {
    width: 7px; height: 7px; border-radius: 50%;
    background: #94a3b8; animation: tdBounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes tdBounce {
    0%,80%,100% { transform: translateY(0); opacity: .5; }
    40%          { transform: translateY(-5px); opacity: 1; }
}
.agent-chat-bubble.typing .typing-dots { display: flex; }
.agent-chat-bubble.typing .chat-text   { visibility: hidden; }
.chat-text { transition: opacity .25s; }

/* ── Inquiry modal button ────────────────────────────────────── */
.btn-inquiry-popup {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding: 14px 18px; margin-bottom: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 14px rgba(99,102,241,.35);
    transition: opacity .15s, transform .1s;
}
.btn-inquiry-popup:hover { opacity: .92; transform: translateY(-1px); }
/* Inside the app-buttons grid — span full width */
.offer-contact-apps__btns .btn-inquiry-popup {
    grid-column: 1 / -1;
    margin-bottom: 0; margin-top: 2px; border-radius: 10px;
    padding: 13px 16px; font-size: 15px;
}

/* ── Inquiry modal overlay & dialog ─────────────────────────── */
.iq-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.6);
    z-index: 9000;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden;
    transition: opacity .25s, visibility .25s;
}
.iq-overlay.open { opacity: 1; visibility: visible; }

/* Mobile: slides up from bottom */
.iq-modal {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    max-height: 92dvh; overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -8px 40px rgba(0,0,0,.18);
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32,1,.77,1);
    will-change: transform;
}
.iq-overlay.open .iq-modal { transform: translateY(0); }

/* Desktop: centered dialog */
@media (min-width: 640px) {
    .iq-modal {
        position: absolute;
        left: 50%; top: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        border-radius: 16px;
        width: 100%; max-width: 540px;
        max-height: 90vh;
        bottom: auto; right: auto;
        box-shadow: 0 24px 64px rgba(0,0,0,.22);
    }
    .iq-overlay.open .iq-modal { transform: translate(-50%, -50%) scale(1); }
}

.iq-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1.5px solid #f1f5f9;
    position: sticky; top: 0; background: #fff; z-index: 1;
    border-radius: 20px 20px 0 0;
}
@media (min-width: 640px) { .iq-header { border-radius: 16px 16px 0 0; } }
.iq-header h2 { margin: 0; font-size: 17px; color: #0f172a; font-weight: 700; }

.iq-close {
    width: 44px; height: 44px; flex-shrink: 0;
    border: none; border-radius: 10px;
    background: #f1f5f9; color: #64748b;
    cursor: pointer; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.iq-close:hover { background: #e2e8f0; color: #334155; }

.iq-body { padding: 20px 20px 32px; }

.iq-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.iq-field label { font-size: 13px; font-weight: 600; color: #374151; }
.iq-field .iq-req { color: #dc2626; margin-left: 2px; }
.iq-field input[type="text"],
.iq-field input[type="email"],
.iq-field input[type="tel"],
.iq-field input[type="file"],
.iq-field select,
.iq-field textarea {
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-size: 16px; /* 16px prevents iOS auto-zoom */
    width: 100%; box-sizing: border-box; min-height: 48px;
    font-family: inherit;
    transition: border-color .15s;
}
.iq-field input:focus, .iq-field select:focus, .iq-field textarea:focus {
    outline: none; border-color: #6366f1;
}
.iq-field textarea { min-height: 100px; resize: vertical; }
.iq-field input[type="checkbox"] {
    width: 20px; height: 20px; min-width: 20px; min-height: 20px;
    flex-shrink: 0; cursor: pointer; accent-color: #6366f1; margin: 0;
}
.iq-checkbox-row { display: flex; align-items: flex-start; gap: 10px; flex-direction: row; }
.iq-checkbox-row input[type="checkbox"] { margin-top: 2px; }

.iq-submit {
    width: 100%; min-height: 52px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
    margin-top: 8px; transition: opacity .15s;
}
.iq-submit:disabled { opacity: .55; cursor: not-allowed; }

.iq-alert {
    padding: 10px 14px; border-radius: 10px;
    font-size: 14px; font-weight: 500; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.iq-alert.success { background: #d1fae5; color: #065f46; }
.iq-alert.error   { background: #fee2e2; color: #991b1b; }

/* Required field error state */
.iq-field--error input,
.iq-field--error select,
.iq-field--error textarea {
    border-color: #ef4444 !important;
    background: #fff5f5;
}
.iq-field--error input:focus,
.iq-field--error select:focus,
.iq-field--error textarea:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}
.iq-field--error input[type="checkbox"] {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

/* Success animation */
.iq-success-wrap {
    display: flex; align-items: center; justify-content: center;
    padding: 60px 20px; position: relative;
}
.iq-success-ring {
    position: absolute;
    width: 110px; height: 110px; border-radius: 50%;
    border: 2.5px solid #10b981;
    animation: iq-ring-pop .55s cubic-bezier(.22,.68,0,1.4) forwards,
               iq-ring-glow 2s ease-in-out 0.55s infinite;
    opacity: 0;
}
.iq-success-icon {
    width: 52px; height: 52px;
    stroke: #10b981;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: iq-check-draw .45s cubic-bezier(.4,0,.2,1) .35s forwards;
    filter: drop-shadow(0 0 8px rgba(16,185,129,.4));
}
@keyframes iq-ring-pop {
    0%   { opacity: 0; transform: scale(.6); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes iq-ring-glow {
    0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,.25); }
    50%      { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
}
@keyframes iq-check-draw {
    to { stroke-dashoffset: 0; }
}

/* Honeypot — absolute+opacity:0, NOT display:none so bots still fill it */
.iq-hp {
    position: absolute; opacity: 0; height: 0; width: 0;
    overflow: hidden; pointer-events: none;
}

/* .adv-* styles are in style.css (loaded globally) */
