/* Import Public Sans from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600&display=swap');

:root {
    --primary-color: #4FC27A;
    --secondary-color: #3da562;
    --background-color: #ffffff;
    --text-color: #292C29;
    --muted-text: #666666;
    --title-color: #296246;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --font-family: 'Public Sans', sans-serif;
    --light-bg: #f5f5f5;
    --hover-color: #e5e5e5;
}

/* Apply font family to all elements */
* {
    font-family: var(--font-family);
    color: var(--text-color);
}


.main-container {
    display: flex;
    flex-direction: column;
}

.plot-container {
    width: 100%;
    padding: 10px;
    /* border: 1px solid var(--border-color); */
    /* border-radius: 8px; */
    background-color: var(--background-color);
    margin: 0 auto 80px;
    /* box-shadow: 0 2px 4px var(--shadow-color); */
}

.logo-container {
    padding: 20px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.header-logo {
    height: 50px;
    width: auto;
}

.header-content {
    max-width: 1024px;
    margin: 20px auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.title-container {
    width: 100%;      /* Add this to ensure proper centering */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;       /* Remove the side padding */
    max-width: 800px;
    margin: 0 auto;
}

.app-title {
    color: #296246;
    font-family: Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin: 10px auto 20px;
}

.header-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
    max-width: 100%;
}

.section-subtitle {
    /* font-size: 1.1rem; */
    margin: 1rem 0 0 0;
    color: #666;
    margin: 0 auto;
    max-width: 800px;
    text-align: center;
}

.report-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.report-link:hover {
    text-decoration: underline;
}

.content-separator {
    margin: 40px 0;
    border: 0;
    border-top: 2px solid var(--border-color);
    width: 100%;
}

h1 {
    color: var(--title-color);
}


h2 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--title-color);
}

h3 {
    margin-top: 20px;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--secondary-color);
}

/* Responsive text sizes */
@media (max-width: 768px) {
    .logo-container {
        position: relative;
        padding: 10px 20px;
        text-align: left;
    }
    
    .header-content {
        margin: 0 auto;
    }

    .app-title {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    .policy-title {
        font-size: 1.2rem;
    }

    .multiplier-description {
        font-size: 0.8em;
    }

    .range-input {
        min-width: 60px;
        max-width: 100px;
        padding: 6px;
    }

    .header-logo {
        height: 40px;
    }

    .header-subtitle {
        font-size: 1rem;
    }
}

/* Adjust plot height based on screen size */
@media (max-width: 480px) {
    #main-plot {
        height: 400px !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .multiplier-title {
        font-size: 1.2rem;
    }

    .policy-name {
        font-size: 1rem;
    }

    .policies-grid {
        grid-template-columns: 1fr;
    }
}

.footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-text {
    color: var(--muted-text);
    font-size: 0.9rem;
    margin: 0;
}

.footer-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Add these spinner styles */
.dash-spinner {
    border-color: var(--primary-color) !important;
    border-top-color: transparent !important;
}

.dash-spinner-container {
    margin: 40px auto;
}

/* Optional: Customize the background overlay */
.dash-loading-callback {
    background-color: hotpink;
}

.dash-spinner {
    color: hotpink;
    type: cube;
}

.dash-default-spinner>div {
    background-color: #253544 !important;
}

/* Markdown content styles */
.markdown-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
}

.markdown-content {
    line-height: 1.6;
}

.markdown-content h1 {
    color: var(--title-color);
    margin-bottom: 30px;
    font-size: 2rem;
}

.markdown-content h2 {
    color: var(--title-color);
    margin-top: 60px;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-align: left;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.markdown-content ul {
    margin-bottom: 20px;
}

/* Back link styles */
.back-link {
    padding: 0;
    font-size: 1rem;
    text-decoration: none;
    color: var(--secondary-color);
}

.back-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}


.explainer-container {
    max-width: 1024px;
    margin: 0 auto;
}

/* Flashing button */

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: background-color 0.2s;
}

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

.btn-primary:active {
    background-color: var(--secondary-color);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(79, 194, 122, 0.5);
    background-color: var(--secondary-color);
}

.btn-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.apply-button {
    width: 100%;
    padding: 0.75rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: background-color 0.2s;
    margin-top: auto;
}

.apply-button:hover {
    background-color: var(--secondary-color);
}

.edit-button {
    padding: 0.75rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: background-color 0.2s;
    margin-top: auto;
}

.edit-button:hover {
    background-color: var(--secondary-color);
}

.flash-button {
    position: relative;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.flash-button::before,
.flash-button::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    border-radius: 50%;
}

.flash-button::before {
    /* Solid inner circle */
    width: 12px;
    height: 12px;
    background-color: var(--secondary-color);
}

.flash-button::after {
    /* Pulsing outer circle */
    width: 12px;
    height: 12px;
    background-color: var(--secondary-color);
    opacity: 0.5;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.btn-primary,
.apply-button,
.edit-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: background-color 0.2s;
}

.btn-primary:hover,
.apply-button:hover,
.edit-button:hover {
    background-color: var(--secondary-color);
}

.apply-button {
    width: 100%;
    margin-top: auto;
}




/****************************/
/* Policy Editor */
/****************************/

.card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.policy-editor-container {
    width: 100%;
    max-width: 800px;
    padding: 10px;
    margin: 0 auto;
    background-color: var(--background-color);
}

.policies-container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.policy-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.policy-editor {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: calc(100vh - 300px);
}

.policy-section {
    margin-bottom: 30px;
    padding: 20px;
    /* border: 1px solid var(--border-color); */
    /* border-radius: 8px; */
    background-color: #f9f9f9;
}


.policies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}


.policy-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* justify-content: space-between; */
    background-color: #f9f9f9;
    border: none;
    transition: transform 0.2s;
}

.policy-card:hover {
    transform: none;
}

.policy-name {
    color: var(--text-color);
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    font-weight: 500;
}


.policy-description-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.policy-description {
    color: var(--muted-text);
    font-size: 0.9rem;
    line-height: 1.4;
    flex-grow: 1;
    margin-bottom: 0;
    padding-bottom: 0;
    margin: 0 0 0px 0;
}


.policy-multipliers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 0;
}


.multiplier-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: transparent !important;
    border: none !important;
}

.multiplier-card .card-body {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.multiplier-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.multiplier-description {
    font-size: 0.9em;
    color: var(--muted-text);
    margin: 5px 0 10px 0;
    line-height: 1.6;
    flex-grow: 1;
    flex: 1;
}

.multiplier-category {
    /* font-size: 0.9em; */
    color: var(--secondary-color);
    margin: 0 0 5px 0;
    line-height: 1.6;
}



/* Combined multiplier content styles */
.multiplier-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Combined multiplier header styles */
.multiplier-header {
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* Combined multiplier title styles */
.multiplier-title {
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 0.7;
}

.range-inputs-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: auto !important;
    padding-top: 10px;
}

.range-input {
    flex: 1;
    min-width: 80px;
    max-width: 120px;
    width: 80px;
}

.range-input input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.range-input .input-group-text {
    background-color: #f8f9fa;
    border-left: none;
    color: var(--muted-text);
    font-size: 0.9em;
}

.range-input .form-control,
.range-input .input-group-text {
    font-size: 0.85rem !important;
    padding: 0.25rem 0.5rem !important;
}


.range-separator {
    color: var(--muted-text);
    font-size: 0.9em;
    margin: 0 5px;
}


.policy-header {
    margin-bottom: 20px;
}

.policy-title {
    letter-spacing: -0.5px;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0;
}

.policy-category {
    font-size: 1rem;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 300;
    }

/* Update existing styles */


.tooltip-icon {
    color: var(--muted-text);
    cursor: help;
    font-size: 14px;
    padding: 2px 6px;
}

/* Add tooltip styles */
.tooltip-icon:hover::before {
    content: attr(title);
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    max-width: 200px;
    z-index: 100;
    transform: translateY(-100%);
    margin-top: -8px;
    white-space: normal;
    line-height: 1.4;
}

.tooltip-icon:hover::after {
    content: '';
    position: absolute;
    border: 8px solid transparent;
    border-top-color: #333;
    transform: translateY(-100%);
    margin-top: 8px;
}

.multiplier-header {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.multiplier-title {
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 0.7;
}

.multiplier-description {
    color: var(--muted-text);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.multiplier-header {
    margin-bottom: 16px;
}

.multiplier-description {
    color: var(--muted-text);
    font-size: 0.9em;
    margin-top: 4px;
    line-height: 1.4;
}

.unit-label {
    color: var(--muted-text);
    font-size: 0.9em;
    margin-left: 8px;
}

/* Add these new styles */
.multiplier-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
}

.multiplier-title {
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.5px;
}


.multipliers-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Update existing styles */
.multiplier-header {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.multiplier-description {
    color: var(--muted-text);
    font-size: 0.9rem;
    margin: 10px 0 0 0;
    line-height: 1.4;
}

.policy-viewer-container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto 10px auto;
}





/* Combined button styles */

.subset-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.subset-span {
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 0.9rem;
    background: var(--light-bg);
    color: var(--muted-text);
}

.subset-span:hover {
    background: var(--hover-color);
    color: var(--primary-color);
}

.subset-span.active {
    background: var(--primary-color);
    color: white;
}

.cookie-notice-link {
    color: var(--secondary-color);
    text-decoration: none;
}

.cookie-notice-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

#cookie-notice-modal .modal-content {
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
}

#cookie-notice-modal .modal-footer {
    border-top: none;
    padding-top: 0;
}

#cookie-notice-modal .modal-body {
    padding: 20px;
}

.cookie-notice-modal {
    max-width: 100% !important;
    margin: 0 !important;
    transform: none !important;
}

.cookie-notice-modal .modal-content {
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border-color);
    max-width: 1024px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-notice-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
}

.cookie-notice-modal .modal-body {
    padding: 20px;
}

.cookie-notice-title {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.cookie-notice-text {
    color: var(--muted-text);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.5;
    margin: 0;
}

.cookie-notice-footer {
    border-top: none;
    padding: 0 20px 20px 20px;
    justify-content: flex-end;
}

.cookie-accept-btn {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
}

.cookie-accept-btn:hover {
    background-color: var(--secondary-color);
}


/* Adjust dropdown and checklist alignment */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

/* Update dropdown menu styles */
.policy-dropdown {
    position: relative;
    width: 400px;
    z-index: 1000;  /* Ensure dropdown appears above other content */
}

.policy-dropdown .dropdown-toggle {
    width: 100%;
    text-align: center;
    background-color: white;
    border: 1px solid #dee2e6;
    color: #495057;
}

.policy-dropdown .dropdown-toggle:hover,
.policy-dropdown .dropdown-toggle:focus {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
}

.policy-dropdown .dropdown-menu {
    width: 100%;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;  /* Add space for the shadow */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Container styling to prevent shadow cropping */
.comparison-section {
    padding-bottom: 20px;  /* Add padding to prevent shadow cropping */
}

/* Keep existing checklist styles */
.policy-checklist {
    width: 100%;
}

.policy-checklist label {
    display: block;
    padding: 8px 16px;
    margin: 0;
    cursor: pointer;
}

.policy-checklist label:hover {
    background-color: #f8f9fa;
}

.policy-checklist input[type="checkbox"] {
    margin-right: 10px;
}

.comparison-section  .form-label {
    margin-bottom: 0;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}