/* ==========================================================================
   Global Styles & Variables
   ========================================================================== */
:root {
    /* Color Palette */
    --dark-bg: #16181a;
    --darker-bg: #0f0f10;
    --lighter-bg: #2c2f33;
    --card-bg: #212325;
    --hover-bg: #313438;
    --glass-bg: rgba(44, 47, 51, 0.8);
    --featured-card-bg: rgba(0, 160, 220, 0.1);

    --text-color: #e6e6e6;
    --muted-text: #a0a0a0;

    /* C-Tech Branding (Placeholders) */
    --primary-color: #00a0dc;
    --secondary-color: #00e0ff;
    --accent-color: #00bfff;

    /* Status & Feedback Colors */
    --border-color: #404040;
    --glass-border: rgba(255, 255, 255, 0.15);
    --featured-card-border: rgba(0, 204, 255, 0.4);
    --focus-color: var(--secondary-color);
    --error-color: #ff6b6b;
    --success-color: #63e6be;
    --recommendation-color: #ffdd57;
    --promo-color: #ffae42;
    --icon-glow-color: rgba(0, 224, 255, 0.6);

    /* Layout & Positioning */
    --summary-sticky-top: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    font-size: 16px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection on inputs */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ==========================================================================
   Main Layout & Structure
   ========================================================================== */
.calculator-container {
    max-width: 1400px;
    margin: 20px auto;
    background-color: var(--darker-bg);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    /* IMPORTANT: overflow:hidden removed to allow sticky summary */
    background:
        /* First blob - starts bottom-leftish */
        radial-gradient(circle at 25% 75%, rgba(0, 160, 220, 0.2), transparent 60%),
        /* Second blob - starts top-rightish */
        radial-gradient(circle at 75% 25%, rgba(0, 224, 255, 0.2), transparent 60%);
}

header {
    background: linear-gradient(135deg, var(--darker-bg), #1f1f21);
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    text-align: center;
}

.logo-container {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.logo {
    height: 100px;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 10px rgba(0, 187, 255, 0.1));
}

h1 {
    font-size: 2.4rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.calculator-content {
    display: grid;
    grid-template-columns: 1fr 420px; /* Config | Summary */
    gap: 35px;
    padding: 35px;
    align-items: start; /* Align items to the top of the grid cells */
}

.config-area {
    padding: 10px 0;
}

/* ==========================================================================
   Section Styling
   ========================================================================== */
h2 { /* Section Titles */
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}

h3 { /* Addon Titles */
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.config-section {
    margin-bottom: 40px;
    background-color: var(--card-bg);
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.section-note {
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-top: -15px; /* Pull up slightly under heading */
    margin-bottom: 20px;
    font-style: italic;
}

/* ==========================================================================
   Form Elements & Controls
   ========================================================================== */

/* --- Option Buttons (Tier, Model, Addon Radios) --- */
.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.option-group {
    position: relative; /* For absolute positioned input */
    flex-grow: 1;
}

.option-group input[type="radio"],
.option-group input[type="checkbox"] {
    position: absolute;
    opacity: 0; /* Hide the actual radio/checkbox */
    cursor: pointer;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    z-index: 1; /* Input above label visually */
    margin: 0;
}

.option-button { /* The styled label */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--lighter-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    width: 100%;
    font-size: 1rem;
    min-height: 70px;
    position: relative; /* Needed for ::after badge */
    font-weight: 500;
    overflow: visible; /* Allow recommendation star badge to overflow */
}

/* Styles for checked state */
.option-group input[type="radio"]:checked + .option-button {
    background: linear-gradient(145deg, var(--primary-color), var(--accent-color));
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.45);
    color: white;
    transform: translateY(-2px);
}
.option-group input[type="radio"]:checked + .option-button span { /* Target child spans */
    color: rgba(255, 255, 255, 0.95);
}

/* Hover state (excluding discount types) */
.option-group:not(.discount-type-group):hover .option-button {
    background-color: var(--hover-bg);
    border-color: var(--accent-color);
}

/* Description text inside buttons */
.model-desc, .option-desc {
    font-size: 0.85rem;
    color: var(--muted-text);
    display: block;
    margin-top: 5px;
    line-height: 1.4;
    transition: color 0.25s ease; /* Smooth text color transition */
}
.option-price { /* Price display in button */
    font-weight: 600;
    margin-top: 7px;
    font-size: 0.9rem;
    transition: color 0.25s ease;
}
.requires-note { /* Small note for dependencies (e.g., AI tier) */
    font-size: 0.75em;
    font-style: italic;
    display: block;
    margin-top: 3px;
    opacity: 0.8;
    color: var(--muted-text);
    transition: color 0.25s ease;
}

/* Tier & Model Button Layouts */
.tier-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.model-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }

/* Recommended Tier Styling */
.option-button.recommended {
    border: 2px solid var(--recommendation-color);
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.6);
}
.option-button.recommended::after { /* Star badge */
    content: "★";
    position: absolute;
    top: -2px;
    right: 8px;
    color: var(--recommendation-color);
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    z-index: 5;
}

/* --- Item Count (Number Input & Slider) --- */
.menu-items .number-input-container { max-width: 200px; }

.item-count-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.number-input-container {
    display: flex;
    align-items: center;
    max-width: 160px;
}
.number-input-container button { /* +/- buttons */
    background: linear-gradient(145deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}
.number-input-container button:hover {
    background: linear-gradient(145deg, var(--accent-color), var(--primary-color));
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}
.number-input-container input { /* Number display */
    flex-grow: 1;
    width: auto;
    min-width: 50px;
    height: 40px;
    text-align: center;
    background-color: var(--lighter-bg);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    margin: 0 8px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.25), 0 0 8px rgba(0, 136, 204, 0.15);
}
/* Chrome/Safari - hide spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    width: 100%;
    max-width: 450px;
}
#itemCountSlider { /* Range slider track */
    flex-grow: 1;
    -webkit-appearance: none; appearance: none;
    width: 100%;
    height: 10px;
    background: var(--lighter-bg);
    border-radius: 5px;
    outline: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}
#itemCountSlider:hover {
    box-shadow: 0 0 8px rgba(0, 204, 255, 0.3);
}
/* Range slider thumb (handle) */
#itemCountSlider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 8px var(--secondary-color);
    transition: background-color 0.2s ease;
}
#itemCountSlider::-moz-range-thumb { /* Firefox thumb */
    width: 20px; height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 8px var(--secondary-color);
}
#itemCountSlider:active::-webkit-slider-thumb { background: var(--secondary-color); }
#itemCountSlider:active::-moz-range-thumb { background: var(--secondary-color); }

.slider-value { /* Numeric value display next to slider */
    font-weight: 600;
    color: var(--secondary-color);
    min-width: 35px;
    text-align: right;
    font-size: 1.1rem;
}
.recommendation-hint { /* Text below slider */
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--recommendation-color);
    font-weight: 500;
    min-height: 22px;
    text-align: center;
}

/* --- Custom Checkboxes (Tags, Layout, Support) --- */
.custom-branding, .custom-layout-options, .priority-support-options {
    display: flex;
    align-items: flex-start; /* Align checkbox top with first line of label/note */
    gap: 12px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}
/* Checked state styling */
.custom-branding:has(input:checked),
.custom-layout-options:has(input:checked),
.priority-support-options:has(input:checked) {
    background-color: rgba(0, 136, 204, 0.15);
    border-left: 3px solid var(--primary-color);
    padding-left: 12px;
}

/* The hidden actual checkbox */
.custom-branding input[type="checkbox"],
.custom-layout-options input[type="checkbox"],
.priority-support-options input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 5px;
    background-color: var(--lighter-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    margin-top: 2px; /* Align with first line of label */
}
/* Checkmark inside the box */
.custom-branding input[type="checkbox"]::before,
.custom-layout-options input[type="checkbox"]::before,
.priority-support-options input[type="checkbox"]::before {
    content: "\f00c"; /* Font Awesome check icon */
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    color: white;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0); /* Hide initially */
    font-size: 12px;
    transition: transform 0.2s ease;
}
/* Checked state for the box */
.custom-branding input[type="checkbox"]:checked,
.custom-layout-options input[type="checkbox"]:checked,
.priority-support-options input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--secondary-color);
}
.custom-branding input[type="checkbox"]:checked::before,
.custom-layout-options input[type="checkbox"]:checked::before,
.priority-support-options input[type="checkbox"]:checked::before {
    transform: translate(-50%, -50%) scale(1); /* Show checkmark */
}

/* Styling for disabled checkbox options */
.custom-layout-options.disabled,
.priority-support-options.disabled {
    opacity: 0.6;
    background-color: rgba(0, 0, 0, 0.1);
    cursor: not-allowed;
}
.custom-branding input[type="checkbox"]:disabled,
.custom-layout-options input[type="checkbox"]:disabled,
.priority-support-options input[type="checkbox"]:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
}
/* Style the label wrapper when disabled */
.custom-branding input[type="checkbox"]:disabled + .label-wrapper,
.custom-layout-options input[type="checkbox"]:disabled + .label-wrapper,
.priority-support-options input[type="checkbox"]:disabled + .label-wrapper {
    color: var(--muted-text);
    cursor: not-allowed;
    opacity: 0.7;
}

.label-wrapper { /* Contains label and note */
    flex-grow: 1;
    cursor: pointer; /* Label wrapper should inherit cursor */
}
.label-wrapper label {
    font-weight: 500;
    cursor: inherit; /* Inherit cursor from parent */
    display: block;
}
.label-wrapper .note {
    margin-top: 8px;
    font-size: 0.8rem;
    width: 100%;
    color: var(--muted-text);
    transition: color 0.2s ease; /* Allow color change if needed */
}
.label-wrapper .note[style*="color: var(--error-color)"] { /* Style note text when error color is applied */
    font-weight: 500;
}

/* --- Discount & Offers Section --- */
.discount-section { text-align: center; }
.discount-container {
    display: flex; flex-wrap: wrap; justify-content: center;
    align-items: flex-end; /* Align bottoms of items */
    gap: 30px 40px;
}
.discount-input-group, .free-months-section, .apply-offer-group {
    width: auto; text-align: center; margin-bottom: 10px; flex-shrink: 0;
}
.discount-input-group label, .free-months-section label {
    display: block; margin-bottom: 10px; font-weight: 500; font-size: 1rem;
}

.manual-discount-wrapper { /* Container for value input and type buttons */
    display: inline-flex; align-items: stretch;
    background-color: var(--lighter-bg);
    border-radius: 8px; border: 1px solid var(--border-color);
    overflow: hidden; height: 42px; width: auto;
}
.manual-discount-wrapper input[type="number"] { /* Discount value input */
    width: 90px; height: 100%; border: none; background: none; box-shadow: none;
    padding: 0 10px; text-align: right; font-size: 1.1rem; font-weight: 600;
    margin: 0; border-right: 1px solid var(--border-color); color: var(--text-color);
}
.discount-type { display: flex; flex-grow: 1; height: 100%; }
.discount-type-group { flex-grow: 1; position: relative; } /* Contains radio + label */
.discount-type-label { /* % / AED buttons */
    padding: 10px 16px; min-height: 42px; border: none; background: none;
    border-left: 1px solid var(--border-color);
    font-weight: 600; font-size: 0.9rem; display: flex; align-items: center;
    justify-content: center; color: var(--muted-text); cursor: pointer;
    transition: background-color 0.2s, color 0.2s; height: 100%; width: 100%;
}
.discount-type-group:first-of-type .discount-type-label { border-left: none; }
.discount-type-group input[type="radio"]:checked + .discount-type-label {
    background-color: var(--primary-color); color: white;
}
/* Remove hover effect from parent option-group */
.discount-type-group .discount-type-label:hover { background-color: inherit; }
.discount-type-group input[type="radio"]:not(:checked) + .discount-type-label {
    background-color: var(--lighter-bg);
}

.free-months-input { max-width: 160px; margin: 0 auto; }

.apply-offer-button {
    background: linear-gradient(145deg, var(--promo-color), #ff7b00);
    color: white; border: none; padding: 10px 20px; border-radius: 8px;
    font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
    box-shadow: 0 3px 7px rgba(0,0,0,0.25); margin-bottom: 5px;
    display: inline-flex; align-items: center; gap: 8px;
}
.apply-offer-button:hover {
    background: linear-gradient(145deg, #ff7b00, var(--promo-color));
    transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.apply-offer-button i { font-size: 0.9em; }

/* --- Reset Button --- */
.reset-button {
    background-color: #4f545c; color: #e0e0e0; border: none;
    padding: 12px 20px; border-radius: 8px; cursor: pointer;
    font-size: 1rem; font-weight: 600; width: 100%; max-width: 300px;
    margin: 40px auto 0 auto; display: block; transition: all 0.2s ease;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.reset-button:hover {
    background-color: var(--error-color); color: white; transform: scale(1.02);
}

/* --- Focus Styles (Accessibility) --- */
button:focus-visible,
input:focus-visible,
.option-group input[type="radio"]:focus-visible + .option-button,
.option-group input[type="radio"]:focus-visible + .discount-type-label,
.custom-branding input[type="checkbox"]:focus-visible + .label-wrapper,
.custom-layout-options input[type="checkbox"]:focus-visible + .label-wrapper,
.priority-support-options input[type="checkbox"]:focus-visible + .label-wrapper,
.toggle-icon:focus-visible,
#itemCountSlider:focus-visible,
.annual-cost-toggle:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
    border-radius: 6px;
    box-shadow: 0 0 12px var(--focus-color);
}
/* Remove default outline when custom focus is applied */
input[type="radio"]:focus-visible, input[type="checkbox"]:focus-visible {
    outline: none;
}

/* ==========================================================================
   Features List Section
   ========================================================================== */
.features-list {
    list-style-type: none;
    padding: 20px;
    background-color: rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 100px;
    column-count: 2; /* Multi-column layout */
    column-gap: 25px;
}
.features-list li {
    margin-bottom: 12px;
    padding-left: 5px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.icon-placeholder { /* Base style for icons in feature list */
    font-style: normal;
    display: inline-block;
    width: auto;
    min-width: 20px;
    text-align: center;
    color: var(--secondary-color);
    text-shadow: 0 0 8px var(--icon-glow-color), 0 0 12px var(--icon-glow-color);
    opacity: 0.9;
    font-size: 1.1em;
    margin-right: 8px; /* Default space after ANY icon */
    vertical-align: middle;
}
.icon-placeholder.success-check { /* Checkmark icon */
    color: var(--success-color);
    text-shadow: 0 0 5px rgba(99, 230, 190, 0.5);
    font-size: 1.05em;
    margin-right: 6px; /* Slightly less space after check */
}
.icon-placeholder.specific-feature-icon { /* Specific icons (layout, lang etc.) */
    margin-right: 6px; /* Space after specific icons */
    /* No margin-left needed, margin-right on preceding icon handles it */
}
/* Adjust if multiple specific icons are used together (e.g., if re-enabling separate G/Tripadvisor) */
/* .icon-placeholder.specific-feature-icon + .icon-placeholder.specific-feature-icon {
    margin-left: -4px;
} */

/* ==========================================================================
   Addon Cards (Accordion)
   ========================================================================== */
.addon-cards {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.addon-card {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    position: relative;
    width: 100%;
    overflow: visible; /* Allow popular badge to overflow */
}

.card-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(37, 37, 37, 0.9);
    cursor: default; /* Header itself isn't clickable */
    border-bottom: 1px solid var(--border-color);
    min-height: 70px;
    position: relative;
    z-index: 2; /* Sit above potential badge background spill */
}

.toggle-icon { /* +/- icon for accordion */
    font-size: 1.5rem; font-weight: bold; color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer; z-index: 3; border: 1px solid transparent; flex-shrink: 0;
}
.toggle-icon:hover {
    background-color: rgba(0, 136, 204, 0.2);
    color: var(--secondary-color);
    transform: scale(1.1);
}
.addon-card.active .toggle-icon { /* 'x' state */
    transform: rotate(45deg);
    color: var(--secondary-color);
    background-color: rgba(0, 136, 204, 0.15);
    border-color: var(--secondary-color);
}

/* Addon Content Area (Hidden/Shown by Accordion) */
.card-content {
    padding: 0 25px; /* Padding applied only when open */
    background-color: transparent;
    border-top: none;
    max-height: 0; /* Start collapsed */
    opacity: 0;
    overflow: hidden; /* Crucial for hiding content */
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-in, padding-top 0.4s ease-out, padding-bottom 0.4s ease-out;
}
.addon-card.active .card-content { /* Expanded state */
    display: block; /* Needed for content to take space */
    max-height: 1000px; /* Allow sufficient height */
    opacity: 1;
    padding-top: 25px;
    padding-bottom: 25px;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-in 0.1s, padding-top 0.5s ease-in-out, padding-bottom 0.5s ease-in-out;
}

/* Layouts for Option Buttons within Addon Cards */
.card-content .option-buttons { display: grid; gap: 15px; }
.photo-options { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.website-options { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.ai-options { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* Style overrides for buttons inside cards */
.card-content .option-button {
    padding: 15px 10px; min-height: 85px;
    background-color: var(--card-bg); /* Slightly different bg */
    border-color: var(--border-color);
    font-weight: 500;
}
.card-content .option-button:hover {
    background-color: var(--hover-bg);
    border-color: var(--accent-color);
}
/* Disabled addon option buttons */
.card-content .option-group input[type="radio"]:disabled + .option-button {
    background-color: var(--lighter-bg) !important; /* Match non-card disabled */
    border-color: var(--border-color) !important;
    opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none;
    color: var(--muted-text) !important;
}
.card-content .option-group input[type="radio"]:disabled + .option-button span { /* Muted text */
    color: var(--muted-text) !important;
}

/* Specific AI Addon Button Styling */
.option-button.included { /* AI included in tier */
    border-left: 4px solid var(--success-color);
    background-color: rgba(99, 230, 190, 0.1);
}
.option-button.upgrade { /* AI upgrade option */
    border-left: 4px solid var(--promo-color);
    background-color: rgba(255, 174, 66, 0.1);
}
small.addon-setup-fee-note { /* AI setup fee note */
    display: block; text-align: center; font-size: 0.85rem; color: var(--promo-color);
    margin-top: 15px; font-weight: 500; background-color: rgba(0,0,0,0.2);
    padding: 5px; border-radius: 4px;
}

/* Tags Addon Specifics */
.tag-option {
    margin-bottom: 25px; padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}
.tag-option:last-child { border-bottom: none; margin-bottom: 0; }
.tag-option label {
    display: block; margin-bottom: 12px; font-weight: 500;
    color: var(--secondary-color); font-size: 1.05em;
}
.tag-input-price { /* Container for input + price text */
    display: flex; align-items: center; justify-content: space-between;
    gap: 15px; flex-wrap: wrap;
}
.tag-option .number-input-container { max-width: 140px; }
.tag-option .price {
    font-size: 0.9rem; color: var(--muted-text); margin-top: 0;
    text-align: right; white-space: nowrap; font-weight: 500;
}

/* Language Addon Specifics */
.language-options .note {
    padding: 12px; background-color: rgba(0, 0, 0, 0.3); border-radius: 6px;
    font-size: 0.9rem; line-height: 1.5; margin-bottom: 18px;
    border-left: 4px solid var(--accent-color);
}
.language-options label {
    display: block; margin: 15px 0 10px; font-weight: 500;
    color: var(--secondary-color); font-size: 1.05em;
}

/* Featured Addon Cards Styling */
#photography-card, #website-card, #ai-chatbot-card {
    background-color: var(--featured-card-bg);
    border: 1px solid var(--featured-card-border);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.2);
    /* Inherits position, z-index, radius from .addon-card */
}
#photography-card .card-header,
#website-card .card-header,
#ai-chatbot-card .card-header {
    background: linear-gradient(120deg, rgba(37, 37, 37, 0.9), rgba(0, 119, 179, 0.5));
}

/* "Popular" Badge for Featured Addon Cards */
#photography-card::after, #website-card::after {
    content: "Popular";
    position: absolute;
    top: -10px; /* Position above */
    right: -10px; /* Position outside */
    background-color: var(--recommendation-color); color: var(--darker-bg);
    font-size: 0.75rem; font-weight: 600; padding: 4px 12px;
    border-radius: 6px; z-index: 10; /* High z-index */
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    transform: rotate(10deg); /* Slight angle */
}

/* ==========================================================================
   Pricing Summary Area (Right Side)
   ========================================================================== */
.summary-area {
    background-color: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    position: sticky; /* Make summary sticky */
    top: var(--summary-sticky-top); /* Offset from top */
    padding: 30px; border-radius: 14px;
    align-self: start; /* Don't stretch vertically */
    z-index: 100; /* Ensure it stays above config area when scrolling */
    /* No max-height or overflow-y to allow full height */
}

.summary-breakdown { margin-bottom: 25px; }
.summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 0; font-size: 1rem;
}
.summary-label { color: var(--muted-text); flex-basis: 58%; text-align: left; padding-right: 15px; }
.summary-value { color: var(--text-color); font-weight: 600; flex-basis: 42%; text-align: right; font-size: 1.05rem; }
hr.summary-divider { border: none; border-top: 1px dashed var(--border-color); margin: 15px 0; }

/* Specific Row Styles */
.subtotal-row { margin-top: 15px; padding-top: 15px; }
.subtotal-row .summary-label { font-weight: 600; color: var(--text-color); }
.subtotal-row .summary-value { font-weight: 700; font-size: 1.1rem; }
.overage-row { display: none; color: var(--promo-color); } /* Shown via JS */
.overage-row .summary-label { color: inherit; }
.discount-row { display: none; color: var(--success-color); font-weight: 500; } /* Shown via JS */
.addon-setup-fees { display: none; color: var(--promo-color); font-weight: 500; font-size: 0.9rem; } /* Shown via JS */
.promo-offer-row { color: var(--promo-color); font-weight: 500; padding-bottom: 15px; border-bottom: 1px dashed var(--border-color); margin-bottom: 15px; }
.promo-label { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.promo-value { font-weight: 600; }

/* Final Totals Block */
.final-totals {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    margin: 0 -30px; /* Extend full width of summary padding */
    padding: 20px 30px;
    border-radius: 0; /* Remove rounding inside */
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.15);
}
.total-row { color: white; font-size: 1.3rem; font-weight: 600; padding: 8px 0; }
.total-label { opacity: 0.9; font-weight: 500; font-size: 1.1rem; }

/* Annual Estimate Toggle */
.summary-footer { margin-top: 25px; text-align: center;}
.annual-estimate-wrapper { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border-color); }
.annual-cost-toggle { /* Clickable link */
    color: var(--accent-color); text-decoration: none; font-weight: 500; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px; transition: color 0.2s ease; padding: 5px 0;
}
.annual-cost-toggle:hover { color: var(--secondary-color); }
.annual-cost-toggle i { transition: transform 0.3s ease; font-size: 0.8em;}
.annual-cost-toggle.active i { transform: rotate(180deg); } /* Chevron flips */

/* Annual Estimate Content (Hidden/Shown via JS class) */
.annual-estimate {
    font-size: 0.95rem; color: var(--muted-text);
    max-height: 0; /* Start hidden */
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-in 0.1s, margin-top 0.4s ease-out;
}
.annual-estimate.visible { /* Class added by JS */
    max-height: 100px; /* Allow space to expand */
    opacity: 1;
    margin-top: 15px; /* Add margin when visible */
}
.estimate-label { font-weight: 500; }
.estimate-value { font-weight: 600; color: var(--text-color); display: block; font-size: 1.05rem; }
.estimate-note { font-size: 0.8rem; display: block; margin-top: 5px; }


/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1200px) { /* Stacking point for summary */
    .calculator-content {
        grid-template-columns: 1fr; /* Single column */
        padding: 20px; gap: 25px;
    }
    .summary-area {
        position: static; /* Unstick the summary */
        margin-top: 30px;
        max-height: none; /* Remove height limits */
        overflow-y: visible; /* Allow content to flow */
        z-index: auto; /* Reset z-index */
    }
}

@media (max-width: 768px) { /* Tablet adjustments */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .features-list { column-count: 1; } /* Single column feature list */
    .final-totals { margin: 20px -20px 0 -20px; padding: 15px 20px; } /* Adjust negative margins */
    .total-row { font-size: 1.2rem; }
}

@media (max-width: 600px) { /* Smaller tablet / Large phone */
    .tier-buttons, .model-buttons { grid-template-columns: 1fr; } /* Stack tier/model buttons */
}

@media (max-width: 480px) { /* Mobile adjustments */
    body { padding: 10px; }
    .calculator-container { margin: 10px auto; }
    .calculator-content { padding: 15px; gap: 20px; }
    header { padding: 20px 15px; }
    .logo { height: 85px; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    .config-section { padding: 20px; }
    /* Stack addon options */
    .card-content .option-buttons,
    .photo-options, .website-options, .ai-options {
        grid-template-columns: 1fr;
    }
    .summary-area { padding: 20px; }
    .final-totals { margin: 20px -20px 0 -20px; padding: 15px 20px; }
    .total-row { font-size: 1.1rem; }
    /* Stack discount controls */
    .discount-container {
        gap: 25px; flex-direction: column; align-items: center;
    }
    .manual-discount-wrapper { width: 100%; max-width: 280px; justify-content: center; }
    .free-months-input { margin: 0 auto; }
    .apply-offer-group { margin-top: 10px; width: 100%; }
    .apply-offer-button { width: 100%; max-width: 280px; justify-content: center; }
}