﻿:root {
    --blue-bg: #2d3669;
    --paper-bg: #dbd2c1;
    --highlight: #e9ba30;
    --neutral-bg: #e9e6e0;
    --font-primary: 'Agrandir', sans-serif;
    --font-secondary: 'Crimson Text', serif;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--blue-bg);
    color: var(--neutral-bg);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.w-60 {
    width: 60%;
}

    body h1,
    body h2,
    body h3,
    body p {
        color: var(--neutral-bg);
    }

.header {
    --header-height: 5rem; /* adjust to actual header size */
    border-bottom: 1px solid #e9e6e0;
    position: relative;
}

    .header h1 {
        font-size: 3.75rem;
        font-weight: 800;
    }

.btn-warning, .btn-light {
    font-weight: 800;
    font-size: 1rem;
    border-radius: 10px;
    border: none;
}

.btn-warning {
    color: var(--blue-bg);
}

.btn-light {
    color: var(--blue-bg);
    background-color: var(--neutral-bg);
}

.main-page {
    scroll-snap-type: y mandatory;
}


.intro-section, .mission-section, .cta-section {
    flex-direction: row;
    gap: 20px;
}

.intro-section {
    min-height: calc(100vh - var(--header-height));
}

.intro-image {
    flex: 1;
    overflow: hidden;
    max-width: calc(100vh - var(--header-height));
}

.cta-image {
    flex: 1;
    overflow: hidden;
}

.intro-image img {
    width: 100%;
    max-height: calc(100vh - var(--header-height));
    height: auto;
    object-fit: cover;
}

.cta-image img {
    width: 100%;
    max-height: 100vh;
    height: auto;
}

#printbtn {
    visibility: hidden;
}

@media print {
    .nprint {
        display: none;
    }
}


.intro-text, .cta-text {
    flex: 1;
    text-align: center;
    padding: 20px;
}

    .intro-text h2 {
        font-size: 2.5rem;
        font-weight: 800;
        margin-bottom: 1.25rem;
    }

    .intro-text h3, .cta-text h3 {
        font-size: 1.25rem;
        font-weight: 750;
        margin-bottom: 1.25rem;
        padding-top: 2.5rem;
    }

    .intro-text p, .cta-text p {
        font-size: 1.125rem;
        line-height: 1.6;
    }

.mission-section {
    background-color: var(--neutral-bg);
    text-align: center;
}

.mission-text h2 {
    color: var(--blue-bg);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.4;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 2rem 0;
}

.top .form-group {
    flex-direction: row;
    gap: 5px;
    padding: 0;
}

.file-upload {
    font-size: 1rem;
    font-weight: 800;
    border-radius: 10px;
    padding: 0.625rem 1.25rem;
    line-height: 0.625rem;
    background-color: var(--neutral-bg);
    color: var(--blue-bg);
    border: none;
    cursor: pointer;
    text-align: center;
    height: 3.125rem;
    width: 100%;
    max-width: 28.125rem;
}

.top .file-upload {
    font-size: 9px;
    font-weight: 600;
    border-radius: 8px;
    padding: 5px 10px;
    line-height: 4px;        
    height: 30px;
    
}

.file-upload::file-selector-button {
        background-color: var(--highlight);
        color: var(--blue-bg);
        border: none;
        padding: 10px;
        font-weight: 800;
        border-radius: 10px;
        cursor: pointer;
        height: 100%;
    }

        .file-upload::file-selector-button:hover {
            background-color: #e6b800;
        }

.cta-button {
    font-weight: 800;
    font-size: 1.125rem;
    background-color: var(--highlight);
    color: var(--blue-bg);
    border-radius: 10px;
    border: none;
    padding: 0.625rem;
    height: 3.125rem;
    width: 100%;
    max-width: 28.125rem;
}

.top .cta-button {
    font-weight: 600;
    font-size: 11px;    
    border-radius: 8px;    
    padding: 5px;
    height: 30px;       
}

    .cta-button:hover {
        background-color: #e6b800;
        cursor: pointer;
    }

.privacy-hint {
    font-size: 0.875rem;
    margin-top: 0.625rem;
}

.footer {
    border-top: 1px solid #e9e6e0;
    position: relative;
}

    .footer nav ul {
        list-style: none;
        display: flex;
        gap: 20px;
        margin: 0;
        padding: 0;
    }

        .footer nav ul li {
            font-weight: 600;
            text-transform: uppercase;
            cursor: pointer;
        }

/* Contract Page Specific Styles */
.modal-content {
    border: none;
    background-color: var(--neutral-bg);
}

.modal-dialog h2,
.modal-dialog h3,
.modal-dialog li,
.modal-dialog ul,
.modal-dialog strong,
.modal-dialog p {
    color: black;
}

.modal-dialog h2 {
    font-weight: 800;
}

.contract-page .header-a {
    background-color: var(--paper-bg);
    color: black;
}

.modal-dialog {
    max-width: 60%;
    background-color: var(--neutral-bg);
    border-radius: 20px;
    margin: auto;
    padding: 30px;
    position: relative;
}

.analysis-container li {
    display: flex;
    gap: 1rem;
    padding: 0.2rem;
}

.summary.section {
    background: none;
}

.close-btn {
    background: none;
    border: none;
    font-size: 30px;
    font-weight: bold;
    color: var(--highlight);
    cursor: pointer;
}

.header-a {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

    .header-a h2 {
        font-size: 20px;
        font-weight: bold;
        text-transform: uppercase;
    }

.score {
    text-align: right;
}

    .score .label, .score .value {
        font-size: 14px;
        font-weight: 800;
        color: black;
    }

    .score .value {
        font-size: 20px;
    }

        .score .value strong {
            color: #e86c1f;
        }

.section {
    background-color: var(--paper-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

    .section h3 {
        font-size: 16px;
        font-weight: bold;
        text-transform: uppercase;
    }

    .section ul {
        list-style: none;
        padding-left: 0;
        font-size: 15px;
    }

    .section li {
        margin-bottom: 6px;
    }

    .section .item {
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--neutral-bg);
    }

    .section .item:last-child {
        border-bottom: none;
    }

        .section .item p {
            margin: 4px 0;
            font-size: 15px;
        }

.summary-box {
    background-color: var(--neutral-bg);
    font-size: 15px;
    padding: 20px;
    border-radius: 10px;
}

.modal-footer .btn-upload {
    background-color: var(--blue-bg);
    color: var(--neutral-bg);
    font-weight: bold;
    text-transform: uppercase;
}

    .modal-footer .btn-upload:hover {
        background-color: #1a1f4d;
    }

    .modal-footer .btn-close-secondary {
        background-color: var(--highlight);
        color: var(--neutral-bg);
        font-weight: bold;
        text-transform: uppercase;
    }

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}
/* Responsive */
@media (max-width: 1200px) {
    .header h1 {
        font-size: 3.5rem;
    }
    .mission-text h2 {
        font-size: 3.5rem;
    }
}

@media (max-width: 992px) {
    .header h1 {
        font-size: 3rem;
    }
    .mission-text h2 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .intro-section {
        flex-direction: column-reverse;
    }
    .mission-section,
    .cta-section {
        flex-direction: column;
    }

    .header h1 {
        font-size: 2.25rem;
    }

    .mission-text h2 {
        font-size: 2.25rem;
    }

    .intro-image {
        max-width: none;
    }

    .intro-image img, .cta-image img {
        max-height: 50vh;
    }

    .w-60 {
        width: 100%;
    }

    .intro-text,
    .cta-text {
        padding: 1rem;
    }

    .intro-text h2 {
        font-size: 2rem;
    }

    .intro-text h3,
    .cta-text h3 {
        font-size: 1.125rem;
        padding-top: 1.25rem;
        margin-bottom: 1rem;
    }

    .intro-text p,
    .cta-text p {
        font-size: 1rem;
    }

    .form-group {
        padding: 1rem 0;
    }
}

@media (max-width: 576px) {
    .header h1 {
        font-size: 2rem;
    }

    .mission-text h2 {
        font-size: 2rem;
    }

    .intro-text h2 {
        font-size: 1.75rem;
    }

    .intro-text h3,
    .cta-text h3 {
        font-size: 1rem;
        padding-top: 1rem;
    }

.file-upload,
    .cta-button,
    .w-60 {
        width: 100%;
    }
}

/* Restore-Toast Styling */
#restoreToast {
    width: max-content;
    font-family: var(--font-primary);
}

#restoreToast .toast-body {
    padding: 0.25rem 0.75rem;
}

#restoreToast button {
    font-family: inherit;
    font-weight: 800;
    color: var(--blue-bg);
}

/* Loading Spinner */
.loading-spinner {
    border: 8px solid var(--neutral-bg);
    border-top: 8px solid var(--highlight);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Accordion Styling */
.accordion-item {
    border: none;
    margin-bottom: 20px;
    background-color: var(--paper-bg);
    border-radius: 10px;
}

/* Tier-level accordion styling (Basic/Premium) */
.tier-accordion .accordion-item {
    background-color: var(--neutral-bg);
    border: 2px solid var(--paper-bg);
}

.tier-accordion .accordion-button {
    background-color: var(--neutral-bg);
    color: var(--blue-bg);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1.25rem;
}

.tier-accordion .accordion-button:not(.collapsed) {
    background-color: var(--neutral-bg);
    color: var(--blue-bg);
    box-shadow: none;
}

.tier-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: var(--highlight);
}

.tier-accordion .accordion-body {
    background-color: var(--neutral-bg);
    padding: 1.5rem;
}

/* Section-level accordion styling (nested within tiers) */
.section-accordion .accordion-button {
    background-color: var(--paper-bg);
    color: black;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
}

.section-accordion .accordion-button:not(.collapsed) {
    background-color: var(--paper-bg);
    color: black;
}

.section-accordion .accordion-button:focus {
    box-shadow: none;
}

.accordion-body.section {
    padding: 20px;
}

/* Dynamic Renderer Field Styling */
.field-item {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.field-item:last-child {
    border-bottom: none;
}

.field-label {
    display: inline-block;
    min-width: 150px;
    margin-right: 1rem;
    color: black;
    font-weight: 700;
}

.field-value {
    display: inline;
    color: black;
    font-weight: 400;
}

/* Nested field styling */
.field-nested {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--highlight);
}

.field-object .field-nested {
    margin-top: 0.75rem;
}

/* Array field styling */
.field-array {
    display: block;
}

.field-array-list {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.field-array-list li {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
}

.field-array-list li:before {
    content: "•";
    color: var(--highlight);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Responsive field styling */
@media (max-width: 768px) {
    .field-label {
        display: block;
        min-width: auto;
        margin-bottom: 0.25rem;
    }

    .field-value {
        display: block;
    }

    .field-nested {
        margin-left: 0.75rem;
        padding-left: 0.5rem;
    }
}

/* Print styles for dynamic renderer */
@media print {
    .field-item {
        page-break-inside: avoid;
    }

    .field-nested {
        border-left-color: #000;
    }

    .accordion-button {
        display: none;
    }

    .accordion-collapse {
        display: block !important;
        height: auto !important;
    }

    .tier-accordion .accordion-item,
    .section-accordion .accordion-item {
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
}
