/* ==========================================================
   Insurance Calculator – Scoped Styles
   All rules are prefixed with .ic-scope to avoid leaking
   into the theme or other plugins.
   ========================================================== */

.ic-scope *,
.ic-scope *::before,
.ic-scope *::after {
    box-sizing: border-box;
}

/* Font is loaded via <link> in the template head */
.ic-scope {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Layout ──────────────────────────────────────────────── */
.ic-scope .tc-container {
    max-width: 1200px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    overflow: hidden;
}

.ic-scope .main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    min-height: calc(100vh - 200px);
}

/* ── Header ──────────────────────────────────────────────── */
.ic-scope .ic-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ic-scope .ic-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="30" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
}

.ic-scope .ic-header__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px;
    position: relative;
    z-index: 1;
}

.ic-scope .ic-header__subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ── Input Section ───────────────────────────────────────── */
.ic-scope .input-section {
    background: #fafbfc;
}

.ic-scope .input-group {
    background: white;
    padding: 30px;
    display: block;
    border: 1px solid #e1e8ed;
}

.ic-scope .group-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ic-scope .form-row {
    margin-bottom: 20px;
}

.ic-scope .form-row:last-child {
    margin-bottom: 0;
}

.ic-scope .ic-label {
    display: block;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* ── Text / Number Inputs ────────────────────────────────── */
.ic-scope .ic-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
    color: inherit;
}

.ic-scope .ic-input:focus {
    outline: none;
    border-color: #f05123;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ── Custom Select ───────────────────────────────────────── */
.ic-scope .custom-select {
    position: relative;
    display: block;
}

.ic-scope .custom-select select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

.ic-scope .custom-select::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #f05123;
    pointer-events: none;
}

.ic-scope .custom-select select:focus {
    outline: none;
    border-color: #f05123;
    box-shadow: 0 0 0 3px rgba(240, 81, 35, 0.1);
}

/* ── Vehicle Type Picker ─────────────────────────────────── */
.ic-scope .vehicle-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.ic-scope .vehicle-option {
    position: relative;
    cursor: pointer;
}

.ic-scope .vehicle-option input[type="radio"] {
    display: none;
}

.ic-scope .vehicle-option .ic-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    margin-bottom: 0;
}

.ic-scope .vehicle-option .ic-label:hover {
    background: #f8f9ff;
}

.ic-scope .vehicle-option input[type="radio"]:checked+.ic-label {
    background: #e2e8f0;
}

.ic-scope .vehicle-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.ic-scope .vehicle-name {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.ic-scope .gasoline-icon {
    transform: translateX(5px);
}

.ic-scope .ic-scope svg {
    transition: all 0.3s ease;
}

.ic-scope .hybrid-icon svg {
    stroke: black;
}

.ic-scope .electric-icon svg {
    fill: white;
    stroke: black;
}

/* ── Ownership Type Picker ───────────────────────────────── */
.ic-scope .ownership-options {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.ic-scope .ownership-option {
    flex: 1;
    position: relative;
}

.ic-scope .ownership-option input[type="radio"] {
    display: none;
}

.ic-scope .ownership-option .ic-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    font-weight: 500;
    margin-bottom: 0;
}

.ic-scope .ownership-option input[type="radio"]:checked+.ic-label {
    background: #e2e8f0;
}

/* ── Sliders ─────────────────────────────────────────────── */
.ic-scope .slider-container {
    margin-top: 8px;
}

.ic-scope .ic-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e1e8ed;
    outline: none;
    transition: background 0.3s ease;
}

.ic-scope .ic-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: #43668e solid 2px;
}

.ic-scope .ic-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.ic-scope .ic-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: #43668e solid 2px;
}

.ic-scope .slider-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #414651;
    font-weight: 500;
}

/* ── Result Section ──────────────────────────────────────── */
.ic-scope .result-section {
    background: #142132;
    color: white;
    position: relative;
    display: block;
}

.ic-scope .results-sticky-container {
    position: relative;
    padding: 30px;
    height: fit-content;
}

.ic-scope .result-box {
    background: #273c54;
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.ic-scope .result-line {
    width: auto;
    height: 1px;
    flex: 1;
    margin-inline: 20px;
    border-bottom: 1px solid #ffffff1f;
}

.ic-scope .method-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ic-scope .result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.ic-scope .result-item span:first-child {
    font-size: 1rem;
    color: #ffffff85;
}

.ic-scope .result-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.ic-scope .result-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
}

/* ── Savings Box ─────────────────────────────────────────── */
.ic-scope .saving-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.ic-scope .savings-box {
    background: linear-gradient(135deg, #24a258, #24ca69);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ic-scope .savings-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.ic-scope .savings-box>div:first-child {
    font-size: 1.1rem;
    margin-bottom: 10px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.ic-scope .savings-amount {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

/* ── CTA Button ──────────────────────────────────────────── */
.ic-scope .cta-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    color: black;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    margin-top: 5px;
}

/* ── Email Subscribe Section ─────────────────────────────── */
.ic-scope .email-line {
    width: auto;
    height: 1px;
    flex: 1;
    border-bottom: 1px solid #ffffff1f;
    margin-top: 20px;
}

.ic-scope .results-title {
    margin-top: 20px;
    color: white;
}

.ic-scope .results-title i {
    color: #9db6d2;
}

.ic-scope .email-box-section {
    margin-top: 30px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ic-scope .email-input-wrap {
    margin-top: 10px;
    background: #334155;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding-left: 15px;
}

.ic-scope .email-input-wrap i {
    color: #637289;
}

.ic-scope .ic-email-field {
    width: auto;
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

.ic-scope .ic-email-field:focus {
    outline: none;
}

.ic-scope .ic-consent-check {
    margin-top: 5px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #637289;
}

.ic-scope .ic-consent-check .ic-label {
    color: #637289;
    margin-bottom: 0;
}

.ic-scope .ic-submit-btn {
    background: #40638c;
    color: white;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    cursor: pointer;
}

.ic-scope .ic-submit-btn:hover {
    background: #40638cdd;
}

.ic-scope .ic-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── First-row layout ────────────────────────────────────── */
.ic-scope .first-row {
    display: flex;
    gap: 10px;
}

.ic-scope .first-row .first-input {
    flex-grow: 1;
}

/* ── Loading animation ───────────────────────────────────── */
.ic-scope .calculating {
    position: relative;
    overflow: hidden;
}

.ic-scope .calculating::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: ic-loading 1.5s infinite;
}

@keyframes ic-loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .ic-scope .first-row {
        flex-direction: column;
    }

    .ic-scope .main-content {
        grid-template-columns: 1fr;
    }

    .ic-scope .results-sticky-container {
        position: relative;
        top: auto;
        max-height: none;
        padding: 20px;
    }

    .ic-scope .ic-header {
        padding: 30px 20px;
    }

    .ic-scope .ic-header__title {
        font-size: 2rem;
    }

    .ic-scope .input-section {
        padding: 20px;
    }

    .ic-scope .vehicle-options {
        grid-template-columns: 1fr;
    }

    .ic-scope .ownership-options {
        flex-direction: column;
    }
}