/* ══════════════════════════════════════════════════════════════
   Cars Punta Cana · Public Form v5.0
   Matching carspuntacana.com brand aesthetic
   Brand green: #1D9E75 · Dark: #085041 · Accent: #F59E0B
   ══════════════════════════════════════════════════════════════ */

:root {
    --g:       #1D9E75;
    --gd:      #0F6E56;
    --gdd:     #085041;
    --gl:      #F0FDF8;
    --gm:      #D1FAE5;
    --amber:   #F59E0B;
    --amber-l: #FFFBEB;
    --slate:   #0F172A;
    --border:  #E2E8F0;
    --muted:   #64748B;
    --light:   #F8FAFC;
    --font:    "Helvetica Neue", Helvetica, Arial, sans-serif;
    --radius:  14px;
    --shadow:  0 16px 48px rgba(15,110,86,0.14);
}

/* ── WRAPPER ── */
.cpc-pub-wrap {
    max-width: 780px;
    margin: 0 auto;
    font-family: var(--font);
    color: var(--slate);
}

/* ── HERO ── */
.cpc-form-hero {
    background: linear-gradient(145deg, var(--gdd) 0%, var(--gd) 40%, var(--g) 75%, #22C78A 100%);
    border-radius: 20px 20px 0 0;
    padding: 52px 40px 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cpc-form-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.cpc-form-hero::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.cpc-hero-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.cpc-form-hero h2 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.15;
    position: relative;
    z-index: 1;
    font-family: Georgia, serif;
}
.cpc-form-hero p {
    margin: 0 0 24px;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    line-height: 1.65;
    position: relative;
    z-index: 1;
}
.cpc-hero-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.cpc-hero-badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.95);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

/* Color band under hero */
.cpc-pub-form::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #F59E0B, #F97316, #EF4444, #8B5CF6, #0EA5E9, #1D9E75);
}

/* ── FORM BODY ── */
.cpc-pub-form {
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow);
}

/* ── STEP SECTIONS ── */
.cpc-form-step {
    padding: 32px 36px 24px;
    border-bottom: 1px solid var(--border);
}
.cpc-form-step:last-of-type { border-bottom: none; }

.cpc-step-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 800;
    color: var(--gd);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 22px;
}
.cpc-step-num {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--g), var(--gd));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(29,158,117,0.3);
}

/* ── GRID ── */
.cpc-pub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.cpc-pub-fld { display: flex; flex-direction: column; gap: 7px; }
.cpc-pub-full { grid-column: 1 / -1; }

/* ── LABELS ── */
.cpc-pub-fld label {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}
.cpc-pub-fld label small {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    color: #94A3B8;
}
.cpc-req { color: #EF4444; }

/* ── INPUTS ── */
.cpc-pub-form input[type="text"],
.cpc-pub-form input[type="email"],
.cpc-pub-form input[type="tel"],
.cpc-pub-form input[type="number"],
.cpc-pub-form input[type="date"],
.cpc-pub-form select,
.cpc-pub-form textarea {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 13px 15px;
    font-size: 14px;
    color: var(--slate);
    background: var(--light);
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font);
    transition: border-color .18s, box-shadow .18s, background .15s;
    outline: none;
    -webkit-appearance: auto;
    appearance: auto;
}
.cpc-pub-form input:focus,
.cpc-pub-form select:focus,
.cpc-pub-form textarea:focus {
    border-color: var(--g);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(29,158,117,0.12);
}
.cpc-pub-form input:hover:not(:focus),
.cpc-pub-form select:hover:not(:focus),
.cpc-pub-form textarea:hover:not(:focus) {
    border-color: #94A3B8;
}
.cpc-pub-form input::placeholder { color: #CBD5E1; }
.cpc-pub-form select { cursor: pointer; }
.cpc-pub-form optgroup { font-style: normal; font-weight: 700; }
.cpc-pub-form textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

/* ── PRICE ESTIMATE ── */
.cpc-pub-estimate {
    background: linear-gradient(135deg, #F0FDF8 0%, #ECFDF5 100%);
    border: 2px solid var(--gm);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin: 22px 0 0;
    display: none;
}
.cpc-est-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cpc-est-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--gd);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    flex-shrink: 0;
}
.cpc-est-price { color: var(--g); font-weight: 700; line-height: 1.3; }
.cpc-est-price small { font-size: 12px; color: var(--muted); font-weight: 400; }
.cpc-est-note { font-size: 12px; color: var(--muted); margin-left: auto; font-style: italic; }

/* ── NOTICE ── */
.cpc-pub-notice {
    background: linear-gradient(135deg, #FFFBEB, #FEF9C3);
    border: 1px solid #FEF08A;
    border-left: 5px solid var(--amber);
    border-radius: var(--radius);
    padding: 16px 22px;
    font-size: 14px;
    color: #92400E;
    margin: 0 36px 28px;
    line-height: 1.65;
}

/* ── SUBMIT BUTTON ── */
.cpc-submit-btn {
    display: block;
    width: calc(100% - 72px);
    margin: 0 36px 36px;
    background: linear-gradient(135deg, #22C78A 0%, var(--g) 40%, var(--gd) 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 19px 28px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: all .22s ease;
    box-shadow: 0 8px 28px rgba(29,158,117,0.35);
    font-family: var(--font);
    position: relative;
    overflow: hidden;
}
.cpc-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 60%);
}
.cpc-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(29,158,117,0.42);
}
.cpc-submit-btn:active { transform: translateY(-1px); }
.cpc-submit-btn:disabled { opacity: .72; transform: none; cursor: not-allowed; }

/* ── SUCCESS MODAL (JS-injected) ── */
#cpcSuccessModal {
    position: fixed; inset: 0;
    background: rgba(8,80,65,0.6);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999;
    opacity: 0; transition: opacity .3s ease;
}
#cpcSuccessModal.cpc-modal-visible { opacity: 1; }
.cpc-modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 52px 44px;
    max-width: 460px;
    width: 90%;
    text-align: center;
    box-shadow: 0 28px 80px rgba(0,0,0,0.25);
    transform: translateY(20px) scale(0.96);
    transition: transform .3s ease;
}
#cpcSuccessModal.cpc-modal-visible .cpc-modal-box {
    transform: translateY(0) scale(1);
}
.cpc-modal-check {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--g), var(--gd));
    color: #fff;
    border-radius: 50%;
    font-size: 36px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    font-weight: 900;
    box-shadow: 0 8px 28px rgba(29,158,117,0.4);
}
.cpc-modal-title {
    font-size: 26px; font-weight: 800;
    margin: 0 0 10px;
    color: var(--slate);
    font-family: Georgia, serif;
    letter-spacing: -0.3px;
}
.cpc-modal-msg { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.cpc-modal-resnum {
    background: var(--gl);
    border: 2px solid var(--gm);
    border-radius: 12px;
    padding: 14px 24px;
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: 900;
    color: var(--gd);
    letter-spacing: 3px;
    margin: 16px 0;
}
.cpc-modal-sub { font-size: 13px; color: var(--muted); margin: 0 0 28px; line-height: 1.6; }
.cpc-modal-close-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--g), var(--gd));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font);
    box-shadow: 0 6px 20px rgba(29,158,117,0.3);
    transition: all .2s;
}
.cpc-modal-close-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(29,158,117,0.38); }

/* ── SUCCESS (PHP fallback) ── */
.cpc-success-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 64px 44px;
    text-align: center;
    box-shadow: var(--shadow);
}
.cpc-success-check {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--g), var(--gd));
    color: #fff;
    border-radius: 50%;
    font-size: 36px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    font-weight: 900;
    box-shadow: 0 8px 28px rgba(29,158,117,0.35);
}
.cpc-success-wrap h2 { font-size: 28px; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.4px; font-family: Georgia, serif; }
.cpc-success-wrap p { color: var(--muted); font-size: 15px; margin: 0 0 8px; line-height: 1.65; }
.cpc-res-num-display {
    background: var(--gl); border: 2px solid var(--gm);
    border-radius: 12px; padding: 14px 24px;
    font-family: monospace; font-size: 20px;
    color: var(--gd) !important; font-weight: 900;
    letter-spacing: 2px; margin: 18px 0 !important;
}
.cpc-success-contacts { display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.cpc-contact-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 13px 24px; border-radius: 12px;
    font-size: 14px; font-weight: 800;
    text-decoration: none; background: var(--g); color: #fff;
    transition: all .18s; letter-spacing: 0.2px;
    box-shadow: 0 4px 14px rgba(29,158,117,0.25);
}
.cpc-contact-btn:hover { background: var(--gd); color: #fff; transform: translateY(-2px); }
.cpc-wa-btn { background: #25D366; box-shadow: 0 4px 14px rgba(37,211,102,0.3); }
.cpc-wa-btn:hover { background: #1A9E50; }

/* ── SELF-CANCEL ── */
.cpc-cancel-lookup {
    margin-top: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-family: var(--font);
}
.cpc-cancel-lookup summary {
    padding: 16px 22px;
    font-size: 13px; color: var(--muted);
    cursor: pointer; list-style: none;
    background: var(--light);
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: background .15s, color .15s;
    user-select: none;
}
.cpc-cancel-lookup summary::before { content: '▾ '; font-size: 12px; }
.cpc-cancel-lookup summary:hover { background: #F1F5F9; color: var(--slate); }
.cpc-cancel-lookup[open] summary { border-bottom-color: var(--border); color: var(--slate); }
.cpc-cancel-lookup summary::-webkit-details-marker { display: none; }
.cpc-cancel-form { padding: 22px; background: #fff; }
.cpc-cancel-form p { font-size: 13px; color: var(--muted); margin: 0 0 16px; line-height: 1.6; }
.cpc-cancel-form .cpc-pub-grid { gap: 14px; margin-bottom: 16px; }
.cpc-cancel-form input {
    border: 2px solid var(--border);
    border-radius: 10px; padding: 11px 14px;
    font-size: 14px; width: 100%;
    box-sizing: border-box; font-family: var(--font);
    outline: none; transition: border-color .15s;
    background: var(--light);
}
.cpc-cancel-form input:focus { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); background: #fff; }
.cpc-cancel-lookup-btn {
    background: #FEF2F2; color: #991B1B;
    border: 2px solid #FECACA; border-radius: 10px;
    padding: 11px 22px; font-size: 13px; font-weight: 800;
    cursor: pointer; font-family: var(--font);
    transition: all .15s;
}
.cpc-cancel-lookup-btn:hover { background: #FEE2E2; border-color: #FCA5A5; }
.cpc-cancel-lookup-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── RESPONSIVE ── */
@media (max-width: 620px) {
    .cpc-pub-grid { grid-template-columns: 1fr; }
    .cpc-pub-full { grid-column: 1; }
    .cpc-form-hero { padding: 40px 24px 36px; border-radius: 16px 16px 0 0; }
    .cpc-form-hero h2 { font-size: 26px; }
    .cpc-form-step { padding: 24px 20px 18px; }
    .cpc-pub-notice { margin: 0 20px 24px; }
    .cpc-submit-btn { width: calc(100% - 40px); margin: 0 20px 28px; font-size: 16px; padding: 17px 20px; }
    .cpc-est-note { margin-left: 0; }
    .cpc-hero-badges { gap: 7px; }
    .cpc-hero-badge { font-size: 11px; padding: 5px 13px; }
    .cpc-modal-box { padding: 40px 28px; }
    .cpc-modal-title { font-size: 22px; }
}
