@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Color Variables and Theme Defaults */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Material 3 Typography Scale (Natural Sizes & Distinct Hierarchy) */
    --display-large: 2.25rem;    /* 36px - Main Logo Title */
    --title-large: 1.5rem;       /* 24px - Modal & Compare Headers */
    --title-medium: 1.25rem;     /* 20px - Step & Section titles */
    --title-small: 1.1rem;       /* 17.6px - Card header, sub-headers */
    --body-large: 1rem;          /* 16px - Standard input text & buttons */
    --body-medium: 0.9rem;       /* 14.4px - Field labels, normal table text */
    --body-small: 0.8rem;        /* 12.8px - Sub-values, timestamps, helper text */
    --label-small: 0.75rem;      /* 12px - Badges, tiny tags, steps */
    
    /* Light Mode Palette (Clean Blue Theme) */
    --bg-app: #f4f7fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f4f8;
    --border-color: #dbe1e8;
    
    --primary: #2b5998;
    --primary-hover: #1f4271;
    --primary-light: #dbe5f2;
    
    --secondary: #576075;
    --secondary-hover: #424a5b;
    
    --accent: #7d5260;
    --accent-light: #ffd8e4;
    
    --text-main: #1c1b1f;
    --text-muted: #49454f;
    --text-light: #79747e;
    
    --success: #386a20;
    --success-light: #d3e8d3;
    
    --error: #ba1a1a;
    --error-light: #ffdad6;
    
    --glass-blur: blur(12px);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 28px;
    
    --transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}



/* Base resets & styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.5;
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.025em;
}

/* Layout */
.container {
    max-width: 1300px;
    width: 90%;
    margin: 2rem auto;
    flex: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-section h1 {
    font-size: var(--display-large);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-section p {
    color: var(--text-muted);
    font-size: var(--body-medium);
    margin-top: 0.25rem;
}



/* Main Workspace Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 560px 1fr;
    }
}

/* Form Styles */
.calculator-form-container {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    height: fit-content;
}

.form-section-title {
    font-size: var(--title-medium);
    margin-bottom: 1.5rem;
    color: var(--primary);
    border-left: 4px solid var(--primary);
    padding-left: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 480px) {
    .grid-2col {
        grid-template-columns: 1fr 1fr;
    }
}

.form-element {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.form-element:last-child {
    margin-bottom: 0;
}

label {
    font-size: var(--body-medium);
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: var(--text-light);
    color: var(--bg-app);
    border-radius: 50%;
    font-size: var(--label-small);
    font-weight: bold;
    cursor: help;
    transition: var(--transition);
}

.info-icon:hover {
    background: var(--primary);
}

/* Input Wrapper Container */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--text-light);
    background: transparent;
    border-radius: var(--radius-md);
    transition: var(--transition);
    overflow: hidden;
    margin-top: 0.25rem;
    height: 56px;
    padding: 0; /* Remove padding to keep prefix/suffix flush */
}

.input-wrapper:focus-within {
    border: 2px solid var(--primary);
}

.input-prefix {
    flex: none;
    color: var(--text-muted);
    font-size: var(--body-medium);
    font-weight: 600;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 16px; /* Indent prefix from wrapper edge */
    padding-right: 8px;
    height: 100%;
}

.input-prefix .material-symbols-outlined {
    font-size: 24px;
}

input[type="text"],
input[type="number"],
select {
    flex: 1; /* Sized to remaining flex container space */
    min-width: 0; /* Prevents overflow/clipping of arrow */
    width: 100%;
    height: 100%;
    padding: 0 8px;
    border: none !important;
    background-color: transparent !important;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: var(--body-large);
    outline: none;
    transition: var(--transition);
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z' fill='%2379747e'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center; /* Slightly more inside to avoid clipping on rounded corners */
    padding-left: 6px !important;
    padding-right: 32px !important; /* Give dropdown chevron more breathing room */
    font-size: 0.85rem !important; /* Prevents text cropping on desktop layout split */
}

.field-frequency {
    flex: none !important; /* Keep suffix compact, do not stretch */
    width: auto !important;
    min-width: 75px;
    height: 100%;
    border: none !important;
    border-left: 1px solid var(--border-color) !important;
    border-radius: 0 !important; /* Clipped by overflow: hidden on wrapper */
    padding: 0 24px 0 12px !important;
    font-size: var(--body-small) !important;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--bg-card-hover) !important;
    background-image: url("data:image/svg+xml;utf8,<svg height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z' fill='%232b5998'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Custom switch / checkbox */
.toggle-element {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-light);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Primary Button */
.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: var(--primary);
    color: var(--bg-app);
    border: none;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--body-large);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Results Section styling */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-placeholder {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
    min-height: 400px;
}

.results-placeholder svg {
    width: 64px;
    height: 64px;
    color: var(--text-light);
}

/* Results Content */
.results-content {
    display: none; /* Toggled in JS */
    animation: fadeIn 0.5s ease;
}

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

/* Summary Grid */
.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .summary-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.card-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-summary.featured {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
}

.card-summary .label {
    font-size: var(--label-small);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.card-summary.featured .label {
    color: var(--bg-app);
    opacity: 0.7;
}

.card-summary .value {
    font-family: var(--font-heading);
    font-size: var(--title-large);
    font-weight: 700;
}

.card-summary.featured .value {
    font-size: 1.75rem;
}

/* Detail Section Cards */
.results-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.results-card-title {
    font-size: var(--title-small);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* Visual layout for Chart & Legend */
.visualization-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 640px) {
    .visualization-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.chart-wrapper {
    position: relative;
    max-width: 250px;
    margin: 0 auto;
}

.legend-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-info {
    flex: 1;
}

.legend-title {
    font-size: var(--body-medium);
    font-weight: 600;
}

.legend-amount {
    font-family: var(--font-heading);
    font-size: var(--title-small);
    font-weight: 700;
}

/* Tables styling */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--body-medium);
    text-align: left;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--primary);
    background: var(--bg-card-hover);
    text-transform: uppercase;
    font-size: var(--body-small);
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

tr.highlight-row {
    background: rgba(56, 106, 32, 0.05);
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: var(--label-small);
    font-weight: 600;
}

.badge-info {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-error {
    background: var(--error-light);
    color: var(--error);
}

/* Toast Message */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    animation: slideUp 0.3s ease;
}

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

/* Actions panel */
.actions-panel {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--text-light);
    color: var(--primary);
    padding: 0.75rem 1.25rem;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* History and Compare Panel */
.history-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-md);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Modal styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: var(--title-large);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--error);
}

.comparison-table-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .comparison-table-wrapper {
        grid-template-columns: 1fr;
    }
}

.compare-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.compare-card-title {
    font-family: var(--font-heading);
    font-size: var(--title-small);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Tooltip custom style */
.tooltip-container {
    position: relative;
    display: inline-block;
}

/* Spinner Loader */
.spinner {
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top: 3px solid var(--bg-app);
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PRINT STYLES - Optimize for standard A4 formatting */
@page {
    size: A4;
    margin: 15mm 10mm 15mm 10mm;
}

@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 11pt !important;
        line-height: 1.4 !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    header,
    .calculator-form-container,
    .actions-panel,
    .history-section,
    .theme-toggle-btn,
    .toast,
    .results-placeholder {
        display: none !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    .results-content {
        display: block !important;
        width: 100% !important;
    }
    
    .results-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 15px !important;
        padding: 15px !important;
        background: white !important;
        border-radius: 8px !important; /* Smaller rounding for print */
    }

    .results-card-title {
        margin-bottom: 10px !important;
        padding-bottom: 5px !important;
    }

    .visualization-layout {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-around !important;
        gap: 20px !important;
    }

    .chart-wrapper {
        max-width: 180px !important;
        max-height: 180px !important;
    }

    .legend-wrapper {
        gap: 5px !important;
    }

    .legend-item {
        gap: 5px !important;
    }

    .legend-amount {
        font-size: 11pt !important;
    }
    
    table {
        width: 100% !important;
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    th, td {
        padding: 6px 10px !important;
        font-size: 10pt !important;
    }
    
    th {
        background: #f2f2f2 !important;
        color: black !important;
    }
}

/* Cycle Selector Styling */
.cycle-selector {
    display: flex;
    background: var(--bg-card);
    border: 1.5px solid var(--text-light);
    border-radius: 100px;
    padding: 4px;
    margin-top: 0.25rem;
}

.cycle-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--body-medium);
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 100px;
    transition: var(--transition);
}

.cycle-btn.active {
    background: var(--primary);
    color: var(--bg-app);
    box-shadow: var(--shadow-sm);
}

.cycle-btn:hover:not(.active) {
    color: var(--primary);
    background: var(--primary-light);
}

.card-summary .sub-value {
    font-size: var(--body-small);
    opacity: 0.8;
    margin-top: 0.25rem;
    color: var(--text-muted);
}

.card-summary.featured .sub-value {
    color: var(--bg-app);
    opacity: 0.9;
}

/* Multi-Step Wizard Progress Bar */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 3.5rem;
    padding: 0 10px;
    margin-top: 1rem;
}

.wizard-progress::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}

.wizard-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: var(--primary);
    z-index: 2;
    transform: translateY(-50%);
    transition: width 0.3s ease;
    width: 0%; /* Dynamic */
}

.wizard-step {
    width: 32px;
    height: 32px;
    background: var(--bg-app);
    border: 3px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--body-small);
    font-family: var(--font-heading);
    color: var(--text-muted);
    z-index: 3;
    transition: var(--transition);
    position: relative;
}

.wizard-step.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 5px var(--primary-light);
}

.wizard-step.completed {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

/* Step label typography conforming to Material 3 label scheme */
.wizard-step .step-label {
    position: absolute;
    top: 38px;
    font-size: var(--label-small);
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wizard-step.active .step-label {
    color: var(--primary);
    font-weight: 700;
}

.wizard-step.completed .step-label {
    color: var(--success);
}

/* Step container animation */
.form-step {
    animation: stepSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.form-step.hidden {
    display: none !important;
}

/* Wizard navigation buttons */
.wizard-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
}

.wizard-actions .btn-primary {
    margin-top: 0 !important;
    width: auto !important;
}

.wizard-actions #btnPrev {
    flex: 40 1 0%;
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    box-shadow: none !important;
}

.wizard-actions #btnPrev:hover {
    opacity: 0.85;
}

.wizard-actions #btnNext,
.wizard-actions #calculateBtn {
    flex: 60 1 0%;
}

/* AdSense Ad Placeholders */
.ad-placeholder {
    background: var(--bg-card-hover);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    overflow: hidden;
    transition: var(--transition);
}

.ad-placeholder:hover {
    background: #eaf0f6;
    border-color: var(--primary);
}

.ad-placeholder.top-ad {
    margin-top: 0;
    margin-bottom: 2rem;
    min-height: 90px;
    width: 100%;
}

.ad-placeholder.inline-ad {
    margin: 2rem 0 1rem 0;
    min-height: 120px;
}

.ad-placeholder .ad-label {
    font-size: var(--label-small);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ad-placeholder .ad-content {
    color: var(--text-muted);
    font-size: var(--body-medium);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ad-placeholder .ad-content span {
    font-weight: 600;
    color: var(--primary);
}

.ad-placeholder .ad-content .material-symbols-outlined {
    font-size: 20px;
    vertical-align: middle;
}

@media print {
    .ad-placeholder {
        display: none !important;
    }
}


