/* =============================================================
   AllCert Quote Popup — acpop.css  v2.2.0
============================================================= */

/* ---- Overlay -------------------------------------------- */
/*
   KEY FIX: The overlay MUST NOT use display:none as default state
   because you cannot transition FROM display:none.
   Strategy:
     - Default: display:grid but visibility:hidden + opacity:0 + pointer-events:none
     - Active:  visibility:visible + opacity:1 + pointer-events:auto
   This means the element is always in the DOM flow but invisible/inert.
*/
#acpop-overlay {
    display: grid;
    place-items: center;
    position: fixed;
    inset: 0;
    z-index: 999999;
    overflow-y: auto;
    padding: 24px 16px;
    background: var(--acpop-overlay, rgba(11,31,46,0.82));
    -webkit-overflow-scrolling: touch;

    /* Hidden by default — NOT display:none so transitions work */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

#acpop-overlay.acpop-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ---- Popup wrap ----------------------------------------- */
#acpop-wrap {
    position: relative;
    width: 100%;
    max-width: var(--acpop-width, 800px);
    background: #fff;
    box-shadow: 0 32px 100px rgba(11,31,46,0.35), 0 8px 24px rgba(11,31,46,0.10);
    margin: auto;

    /* Wrap starts scaled down; transitions to normal when overlay is active */
    opacity: 0;
    transform: scale(0.94) translateY(16px);
    transition: opacity 0.34s cubic-bezier(0.22,1,0.36,1) 0.04s,
                transform 0.34s cubic-bezier(0.22,1,0.36,1) 0.04s;
}

#acpop-overlay.acpop-active #acpop-wrap {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ---- Animation variants --------------------------------- */
/* slide-up */
#acpop-overlay.acpop-anim-slide-up #acpop-wrap {
    transform: translateY(50px);
}
#acpop-overlay.acpop-active.acpop-anim-slide-up #acpop-wrap {
    transform: translateY(0);
}

/* fade only */
#acpop-overlay.acpop-anim-fade #acpop-wrap {
    transform: none;
}
#acpop-overlay.acpop-active.acpop-anim-fade #acpop-wrap {
    transform: none;
}

/* ---- Two-column inner layout ---------------------------- */
#acpop-inner {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 540px;
}

/* ---- Brand sidebar (left) ------------------------------- */
#acpop-sidebar {
    background: #0B1F2E;
    padding: 44px 28px 36px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
#acpop-sidebar::before {
    content: '';
    position: absolute;
    bottom: -70px;
    left: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(184,144,42,0.09);
    pointer-events: none;
}
#acpop-sidebar::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(184,144,42,0.06);
    pointer-events: none;
}

.acpop-brand-tag {
    display: inline-block;
    background: #B8902A;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 5px 10px;
    margin-bottom: 24px;
}
.acpop-brand-headline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 26px;
    font-weight: 400;
    color: #fff;
    line-height: 1.25;
    margin: 0 0 16px;
}
.acpop-brand-headline em {
    font-style: italic;
    color: #B8902A;
}
.acpop-brand-divider {
    width: 36px;
    height: 2px;
    background: #B8902A;
    margin-bottom: 18px;
}
.acpop-brand-tagline {
    font-size: 12px;
    color: rgba(255,255,255,0.48);
    line-height: 1.75;
    margin: 0;
}
.acpop-brand-trust {
    margin-top: auto;
    padding-top: 32px;
}
.acpop-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.acpop-trust-icon {
    width: 30px;
    height: 30px;
    background: rgba(184,144,42,0.14);
    border: 1px solid rgba(184,144,42,0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}
.acpop-trust-text {
    font-size: 11px;
    color: rgba(255,255,255,0.52);
    line-height: 1.35;
}
.acpop-trust-text strong {
    display: block;
    color: rgba(255,255,255,0.88);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 1px;
}

/* ---- Form panel (right) --------------------------------- */
#acpop-body {
    padding: 40px 40px 36px;
    overflow-y: auto;
}

/* ---- Close button --------------------------------------- */
#acpop-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: rgba(11,31,46,0.80);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, transform 0.22s;
    padding: 0;
    z-index: 10;
    border-radius: 50%;
    line-height: 1;
}
#acpop-close:hover {
    background: #B8902A;
    transform: rotate(90deg);
}
#acpop-close.acpop-close-locked {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---- Countdown badge ------------------------------------ */
#acpop-countdown {
    display: none;
    position: absolute;
    top: 16px;
    right: 56px;
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 34px;
}

/* ---- Success banner ------------------------------------- */
#wf_splash {
    display: none;
    align-items: flex-start;
    gap: 13px;
    background: #f0faf4;
    border: 1.5px solid #27ae60;
    border-left: 4px solid #27ae60;
    padding: 14px 18px;
    margin-bottom: 22px;
}
.acpop-check-icon {
    width: 22px;
    height: 22px;
    background: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
#wf_splash_info {
    font-size: 13px;
    color: #1a5c30;
    line-height: 1.6;
}

/* ---- Form header ---------------------------------------- */
.acpop-form-header { margin-bottom: 24px; }
.acpop-form-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 400;
    color: #0B1F2E;
    margin: 0 0 6px;
    line-height: 1.2;
}
.acpop-form-title em { font-style: italic; color: #B8902A; }
.acpop-form-sub {
    font-size: 13px;
    color: #8a8880;
    margin: 0;
    line-height: 1.55;
}
.acpop-form-divider {
    width: 34px;
    height: 2px;
    background: #B8902A;
    margin: 14px 0 22px;
}

/* ---- Form fields ---------------------------------------- */
.ac-cf { box-sizing: border-box; }
.ac-cf * { box-sizing: border-box; }

.ac-cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
    margin-bottom: 13px;
}
.ac-cf-row.ac-full { grid-template-columns: 1fr; }

.ac-cf-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ac-cf-field label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #6a6a68;
}
.ac-cf-field label .r { color: #B8902A; }

.ac-cf-field input,
.ac-cf-field select,
.ac-cf-field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid #e8e4de;
    background: #fcfbf9;
    font-size: 14px;
    color: #1a1a1a;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    font-family: inherit;
}
.ac-cf-field input:focus,
.ac-cf-field select:focus,
.ac-cf-field textarea:focus {
    border-color: #B8902A;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(184,144,42,0.10);
}
.ac-cf-field input.acpop-error { border-color: #c0392b !important; background: #fff8f7; }
.ac-cf-field input::placeholder,
.ac-cf-field textarea::placeholder { color: #c4c0b9; }

.ac-cf-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B8902A' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-color: #fcfbf9;
    padding-right: 38px;
    cursor: pointer;
}
.ac-cf-field select:focus { background-color: #fff; }

.ac-cf-field textarea {
    resize: vertical;
    min-height: 94px;
    line-height: 1.65;
}

/* File drop */
.ac-cf-drop {
    border: 1.5px dashed #d8d3cb;
    background: #fcfbf9;
    padding: 11px 13px;
    cursor: pointer;
    border-radius: 2px;
    transition: border-color 0.18s, background 0.18s;
}
.ac-cf-drop:hover { border-color: #B8902A; background: #fffdf9; }
.ac-cf-drop input[type="file"] {
    width: 100%;
    cursor: pointer;
    font-size: 12px;
    color: #6a6a68;
    padding: 0;
    border: none;
    background: transparent;
}
#ac-file-names { font-size: 11px; color: #B8902A; margin-top: 4px; font-weight: 600; }

.ac-opt { font-weight: 300; text-transform: none; letter-spacing: 0; font-size: 10px; color: #8a8880; }
.ac-cf-hint { font-size: 10px; color: #a8a49e; margin-top: 3px; display: block; }

/* Buttons */
.ac-cf-submit-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.ac-cf-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    background: #B8902A;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 2px solid #B8902A;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.14s, box-shadow 0.18s;
    font-family: inherit;
}
.ac-cf-submit:hover {
    background: #9a7820;
    border-color: #9a7820;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(184,144,42,0.28);
}
.ac-cf-submit:active { transform: translateY(0); }
.ac-cf-reset {
    display: inline-flex;
    align-items: center;
    padding: 12px 16px;
    background: transparent;
    color: #a8a49e;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    border: 1.5px solid #e0dbd3;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.18s, color 0.18s;
}
.ac-cf-reset:hover { border-color: #8a8880; color: #4a4a48; }

.ac-cf-privacy {
    font-size: 11px;
    color: #b4b2a9;
    margin-top: 14px;
    line-height: 1.7;
}

/* ---- Trigger button shortcode --------------------------- */
.acpop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    background: #B8902A;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 2px solid #B8902A;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.18s, transform 0.14s;
    text-decoration: none;
    font-family: inherit;
}
.acpop-btn:hover { background: #9a7820; border-color: #9a7820; color: #fff; transform: translateY(-1px); }

/* ---- Body scroll lock ----------------------------------- */
body.acpop-locked { overflow: hidden; }

/* ---- Inline embed --------------------------------------- */
.acpop-inline-wrap #acpop-overlay {
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: none !important;
    padding: 0 !important;
    overflow: visible !important;
    display: grid !important;
}
.acpop-inline-wrap #acpop-wrap {
    max-width: 100% !important;
    box-shadow: 0 4px 24px rgba(11,31,46,0.10) !important;
    opacity: 1 !important;
    transform: none !important;
}
.acpop-inline-wrap #acpop-close,
.acpop-inline-wrap #acpop-countdown { display: none !important; }

/* ---- Responsive ----------------------------------------- */
@media (max-width: 768px) {
    #acpop-overlay { padding: 0; align-items: flex-start; }
    #acpop-wrap { min-height: 100svh; }
    #acpop-inner { grid-template-columns: 1fr; }
    #acpop-sidebar { padding: 24px 22px 20px; }
    #acpop-sidebar::before, #acpop-sidebar::after { display: none; }
    .acpop-brand-trust { display: none; }
    .acpop-brand-headline { font-size: 20px; }
    #acpop-body { padding: 26px 20px; }
    .ac-cf-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    #acpop-body { padding: 20px 16px; }
}
