/* Adam CPI Calculator - Full Page Design (scoped to #adam-cpi-page) */
#adam-cpi-page {
    --primary: #1e293b;
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --white: #ffffff;
    --bg-gray: #f8fafc;
    --border: #e2e8f0;
    --success: #10b981;

    background-color: var(--white) !important;
    color: var(--text-dark);
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

#adam-cpi-page * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

/* Container */
#adam-cpi-page .container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Hero Section */
#adam-cpi-page .adam-cpi-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

#adam-cpi-page .hero-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#adam-cpi-page .adam-cpi-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

#adam-cpi-page .adam-cpi-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: #cbd5e1;
}

/* Calculator Section */
#adam-cpi-page .main-content {
    margin-top: -60px;
    padding: 0 20px 80px;
}

#adam-cpi-page .calculator-wrapper {
    position: relative;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    overflow: visible;
    max-width: 1000px;
    margin: 0 auto;
}

/* Left Side: Info */
#adam-cpi-page .calc-info {
    padding: 60px;
    background-color: var(--bg-gray);
}

#adam-cpi-page .calc-info h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

#adam-cpi-page .calc-info p {
    color: var(--text-light);
    margin-bottom: 24px;
}

#adam-cpi-page .feature-list {
    list-style: none;
}

#adam-cpi-page .feature-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

#adam-cpi-page .feature-list li::before {
    content: '✓';
    margin-right: 12px;
    color: var(--accent);
    font-weight: 900;
}

#adam-cpi-page .calc-quote {
    margin-top: 40px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Right Side: Form */
#adam-cpi-page .calc-form {
    padding: 60px;
}

#adam-cpi-page .form-group {
    margin-bottom: 20px;
}

#adam-cpi-page label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

#adam-cpi-page select,
#adam-cpi-page input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 1rem;
    transition: 0.2s;
    outline: none;
    background: #fff;
}

#adam-cpi-page select:focus,
#adam-cpi-page input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

#adam-cpi-page .toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    cursor: pointer;
}

#adam-cpi-page button {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}

#adam-cpi-page button:hover { background: #1d4ed8; }
#adam-cpi-page button:active { transform: scale(0.98); }

/* Results Display */
#adam-cpi-page .results-area {
    margin-top: 30px;
    display: none;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#adam-cpi-page .main-result {
    background: var(--accent-light);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    border: 1px dashed var(--accent);
}

#adam-cpi-page .main-result .val {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
}

#adam-cpi-page .sub-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

#adam-cpi-page .sub-box {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

#adam-cpi-page .sub-box .label { font-size: 0.7rem; text-transform: uppercase; color: var(--text-light); font-weight: 700; }
#adam-cpi-page .sub-box .val { font-size: 1.1rem; font-weight: 700; }

/* Data Table Section */
#adam-cpi-page .data-section {
    padding: 60px 20px;
    background: var(--bg-gray);
}

#adam-cpi-page .table-container {
    background: var(--white);
    border-radius: 16px;
    overflow-x: auto;
    border: 1px solid var(--border);
    margin-top: 30px;
}

#adam-cpi-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#adam-cpi-page th {
    background: #f1f5f9;
    text-align: left;
    padding: 16px;
    font-weight: 600;
}

#adam-cpi-page td {
    padding: 16px;
    border-top: 1px solid var(--border);
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    #adam-cpi-page .adam-cpi-hero h1 { font-size: 2.2rem; }
    #adam-cpi-page .calculator-wrapper { grid-template-columns: 1fr; }
    #adam-cpi-page .calc-info { padding: 40px 30px; }
    #adam-cpi-page .calc-form { padding: 40px 30px; }
}


/* Fix grid overflow/clipping in some themes/browsers */
#adam-cpi-page .calculator-wrapper > * { min-width: 0; }

/* Improve Select visibility + centering */
#adam-cpi-page select {
    max-width: 100%;
    text-align: center;
    text-align-last: center;
}

/* Perfectly center the button label */
#adam-cpi-page button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
}


/* --- UI fixes for theme overrides (checkbox + select arrow) --- */

/* Make the checkbox clearly visible even if theme changes form control styles */
#adam-cpi-page input[type="checkbox"]{
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Some themes remove native styles; force a consistent checkbox */
#adam-cpi-page .toggle-container input[type="checkbox"]{
    appearance: auto !important;
    -webkit-appearance: auto !important;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
}

/* Ensure select dropdown arrow is visible (themes often set appearance:none) */
#adam-cpi-page select{
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    padding-right: 44px; /* room for arrow */
    min-height: 48px;
    line-height: 1.2;
}



/* Ensure only ONE dropdown icon (native arrow) */
#adam-cpi-page select{
    background-image: none !important;
    background-color: #fff;
}

/* PDF download button */
#adam-cpi-page .adam-pdf-download { margin-top: 14px; }
#adam-cpi-page .adam-pdf-btn {
    width: 100%;
    padding: 14px 16px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#adam-cpi-page .adam-pdf-btn:hover { opacity: 0.92; }


/* Instruction video card (left panel) */
#adam-cpi-page .adam-video-card{
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    padding: 14px;
}
#adam-cpi-page .adam-video-title{
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-dark, #0f172a);
    margin-bottom: 10px;
}
#adam-cpi-page .adam-video-note{
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-light, #64748b);
}
#adam-cpi-page .adam-video-embed{
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
}
#adam-cpi-page .adam-video-embed iframe,
#adam-cpi-page .adam-video-embed object,
#adam-cpi-page .adam-video-embed embed{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* Full-width instruction video section (between hero and calculator) */
#adam-cpi-page .adam-video-section{
    padding: 0 20px 22px;
    margin-top: -44px; /* sits closer to hero */
}
#adam-cpi-page .adam-video-section .container{
    max-width: 1100px;
    margin: 0 auto;
}
#adam-cpi-page .adam-video-section-card{
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0,0,0,.08);
    overflow: hidden;
}
#adam-cpi-page .adam-video-section-head{
    padding: 18px 18px 0;
}
#adam-cpi-page .adam-video-section-title{
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-dark, #0f172a);
    margin-bottom: 6px;
}
#adam-cpi-page .adam-video-section-subtitle{
    font-size: 0.9rem;
    color: var(--text-light, #64748b);
    margin-bottom: 14px;
}
#adam-cpi-page .adam-video-section-card .adam-video-embed{
    border-radius: 0;
}


/* Improved full-width instruction video section */
#adam-cpi-page .adam-video-grid{
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 18px;
    padding: 0 18px 18px;
}
#adam-cpi-page .adam-video-panel{ min-width: 0; }

#adam-cpi-page .adam-video-embed{
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: #0f172a;
    border-radius: 14px;
}

/* WordPress oEmbed output may include a wrapper <div> around iframe */
#adam-cpi-page .adam-video-embed iframe,
#adam-cpi-page .adam-video-embed > div,
#adam-cpi-page .adam-video-embed object,
#adam-cpi-page .adam-video-embed embed{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* If wp_oembed_get returns a wrapper div with an iframe inside */
#adam-cpi-page .adam-video-embed > div iframe{
    width: 100%;
    height: 100%;
    border: 0;
}

/* Steps (desktop only) */
#adam-cpi-page .adam-video-steps{
    background: #f8fafc;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    padding: 14px;
}
#adam-cpi-page .adam-steps-title{
    font-weight: 900;
    color: var(--text-dark, #0f172a);
    margin-bottom: 10px;
    font-size: 0.95rem;
}
#adam-cpi-page .adam-steps-list{
    list-style: none;
    padding: 0;
    margin: 0;
}
#adam-cpi-page .adam-steps-list li{
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 8px;
    border-radius: 12px;
}
#adam-cpi-page .adam-steps-list li + li{
    margin-top: 6px;
}
#adam-cpi-page .adam-steps-list .num{
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.25);
}
#adam-cpi-page .adam-steps-list .txt{
    font-size: 0.9rem;
    color: var(--text-dark, #0f172a);
    line-height: 1.35;
}

/* Responsive: stack + hide steps on small screens */
@media (max-width: 900px){
    #adam-cpi-page .adam-video-grid{
        grid-template-columns: 1fr;
        padding: 0 14px 14px;
    }
    #adam-cpi-page .adam-video-steps{
        display: none;
    }
    #adam-cpi-page .adam-video-section{
        margin-top: -28px;
    }
}




/* CTA below Index Data Overview table */
#adam-cpi-page .adam-oldcalc-cta{
    margin-top: 20px;
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
#adam-cpi-page .adam-oldcalc-text{
    font-weight: 700;
    color: var(--text-dark, #0f172a);
}
#adam-cpi-page .adam-oldcalc-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
    background: var(--accent, #2563eb);
    color: #ffffff;
    white-space: nowrap;
}
#adam-cpi-page .adam-oldcalc-btn:hover{
    filter: brightness(0.95);
}
@media (max-width: 900px){
    #adam-cpi-page .adam-oldcalc-cta{
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    #adam-cpi-page .adam-oldcalc-btn{
        width: 100%;
    }
}


