/* Camber Brand Design System Stylesheet */

@font-face {
    font-family: 'Schulbuch Nord';
    src: url('../assets/schulbuch_nord_pro.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* Color palette */
    --camber-white: #F4F5F3;
    --paper: #F8FBF0;
    --papyrus: #EEF0E8;
    --jade: #8BC6B0;
    --jade-lite: #DFE5DC;
    --soil: #959085;
    --taupe: #CBC8BF;
    --haze: #D2D6DF;
    --cta-black: #505050;
    --camber-black: #676767;
}

body {
    font-family: 'Schulbuch Nord', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--camber-white);
    color: var(--camber-black);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(223, 229, 220, 0.2) 0%, rgba(244, 245, 243, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    color: var(--camber-black);
    font-weight: 400;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.card {
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(203, 200, 191, 0.2);
    transition: box-shadow 0.3s ease;
}

/* Remove the inner shadow effect */
.card::before {
    content: none;
}

/* Remove the glow effect */
.card::after {
    content: none;
}

.card-content {
    padding: 24px;
}

.row.filters-grid {
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding-right: 15px;
}

@media (min-width: 992px) {
    .filters-grid .col.l3 {
        width: 16.66%; /* Adjust for 6 columns */
        flex: 0 0 16.66%;
        max-width: 16.66%;
        padding: 0 10px;
    }
    
    .container {
        width: 95%;
        max-width: 1500px;
    }
}

/* For mobile devices */
@media (max-width: 600px) {
    .filters-grid .col.s12 {
        width: 100%;
        margin-bottom: 15px;
    }
}

/* For tablets */
@media (min-width: 601px) and (max-width: 991px) {
    .filters-grid .col.m6 {
        width: 33.33%;
        padding: 0 10px;
        margin-bottom: 15px;
    }
}

.input-field {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    position: relative;
}

label {
    font-size: 1rem;
    color: var(--cta-black);
    position: relative;
    display: block;
    margin-bottom: 12px;
    font-weight: 400;
}

/* New form-label class for subtle small labels above input fields */
.form-label {
    font-size: 0.7rem;
    color: var(--soil);
    position: absolute;
    top: -8px;
    left: 8px;
    z-index: 1;
    background: white;
    padding: 0 4px;
    font-weight: 400;
    letter-spacing: 0.03em;
}

/* Select2 Camber styling */
.select2-container {
    margin-top: 5px;
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--taupe);
    border-radius: 4px;
    min-height: 42px;
    background-color: white;
    font-family: 'Schulbuch Nord', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 4px 8px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--jade);
    box-shadow: 0 0 0 2px rgba(139, 198, 176, 0.2);
}

/* Style the placeholder text */
.select2-container--default .select2-search--inline .select2-search__field::placeholder {
    color: var(--soil);
    opacity: 0.7;
}

/* Ensure the dropdown has correct z-index */
.select2-container--open .select2-dropdown {
    z-index: 9999;
}

/* Style the "Select All" option differently */
.select2-results__option[id*="select2-"][id$="-all"] {
    font-weight: 500;
    color: var(--jade);
    border-bottom: 1px solid var(--papyrus);
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--jade-lite);
    color: var(--cta-black);
    border: none;
    border-radius: 16px;
    padding: 2px 8px 2px 24px;
    margin: 4px;
    position: relative;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.5;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--soil);
    border: none;
    background: none;
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    line-height: 14px;
    width: 14px;
    height: 14px;
    text-align: center;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--cta-black);
    background-color: transparent;
}

.select2-container--default .select2-search--inline .select2-search__field {
    font-family: 'Schulbuch Nord', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 7px;
    color: var(--cta-black);
}

.select2-dropdown {
    border: 1px solid var(--papyrus);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--jade-lite);
    color: var(--cta-black);
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--jade-lite);
    color: var(--cta-black);
}

.select2-results__option {
    padding: 8px 12px;
    font-family: 'Schulbuch Nord', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.select2-container--default .select2-results__option--highlighted[data-select2-id="select2-data-0-all"] {
    color: var(--jade);
    font-weight: 500;
}

.content-area {
    margin-top: 2rem;
    padding: 24px;
    background-color: white;
}

.placeholder {
    text-align: center;
    color: var(--soil);
    padding: 20px 0;
    font-size: 1.2rem;
}

/* Custom button styling based on Camber UI/UX style guide */
.btn-camber {
    background-color: var(--soil);
    color: white;
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.btn-camber::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.btn-camber:hover {
    background-color: var(--cta-black);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.btn-camber-secondary {
    background-color: var(--jade-lite);
    color: var(--cta-black);
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-left: 10px;
    border: none;
    cursor: pointer;
}

.btn-camber-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.btn-camber-secondary:hover {
    background-color: var(--jade);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Material Icons customized for Camber */
.material-icons {
    color: var(--soil);
}

/* Progress indicator */
.progress {
    background-color: var(--haze);
    height: 4px;
    border-radius: 2px;
}

.progress .indeterminate {
    background-color: var(--jade);
}

/* Action buttons container */
.action-buttons {
    margin-top: 30px;
    text-align: center;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.6rem;
    }
    
    .col.s12 {
        margin-bottom: 8px;
    }
    
    .input-field {
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .card-content {
        padding: 16px;
    }
    
    .btn-camber, .btn-camber-secondary {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

/* Add styles for the distribution results */
#distribution-results {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.distribution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.distribution-header h4 {
    margin: 0;
}

.distribution-header button {
    padding: 0;
    margin: 0;
    color: #757575;
}

.distribution-header button:hover {
    color: #212121;
    background-color: rgba(0, 0, 0, 0.05);
}

#distribution-results h4 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 500;
}

#distribution-results h5 {
    color: #616161;
    margin: 20px 0 10px 0;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.distribution-text {
    line-height: 1.5;
}

.summary-section,
.percentiles-section,
.selection-summary {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.histogram-text {
    font-family: monospace;
    margin: 15px 0;
    background-color: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.histogram-bar {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    white-space: nowrap;
}

.histogram-bar .range {
    min-width: 120px;
    font-weight: 500;
}

.histogram-bar .bar {
    color: #1976d2;
    margin: 0 10px;
    flex-grow: 1;
}

.histogram-bar .count {
    min-width: 40px;
    text-align: right;
    color: #616161;
}

.error {
    color: #d32f2f;
    font-weight: 500;
    padding: 15px;
    background-color: #ffebee;
    border-radius: 4px;
}

.raw-data-section {
    margin: 15px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.raw-data-section pre {
    margin: 0;
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 12px;
    line-height: 1.4;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.collapsible-header:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.select2-container--default.select2-container--disabled .select2-selection--multiple {
    background-color: var(--papyrus);
    cursor: not-allowed;
    opacity: 0.7;
}

.select2-container--default.select2-container--disabled .select2-selection__choice {
    background-color: var(--haze);
    color: var(--soil);
}

.select2-container--default.select2-container--disabled .select2-search--inline .select2-search__field {
    color: var(--soil);
    opacity: 0.6;
}

/* Responsive layout styles */
@media screen and (min-width: 1000px) {
    .layout-container {
        display: flex;
        flex-direction: row;
        height: calc(100vh - 100px); /* Adjust for header height */
        margin-top: 20px;
    }
    
    .sidebar {
        width: 33.33%;
        padding-right: 15px;
        overflow-y: visible; /* Change from auto to visible - card will handle scrolling */
    }
    
    /* Style card in sidebar to have fixed height with scrolling content */
    .sidebar .card {
        height: 620px;
        display: flex;
        flex-direction: column;
    }
    
    /* Make card-content scrollable inside the fixed height card */
    .sidebar .card-content {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    
    /* This is to ensure the sidebar header stays fixed at the top */
    .sidebar .sidebar-header {
        flex-shrink: 0; /* Prevent header from shrinking */
    }
    
    /* Make the filters grid take the remaining height */
    .sidebar .filters-grid {
        flex: 1;
        overflow-y: auto;
    }
    
    .main-content {
        width: 66.67%;
        padding-left: 15px;
    }
    
    .footer {
        clear: both;
        padding-top: 20px;
    }
    
    /* Force single column in sidebar at larger screens */
    .sidebar .col.m6 {
        width: 100% !important;
    }
}

/* Box plot styling */
#boxplot-container {
    margin: 0;
    padding: 0;
    background-color: #fff;
    height: calc(100vh - 215px); /* Adjusted height to account for the new header */
    position: relative; /* For positioning of error messages */
    width: 100%;
}

/* Adjust the layout-container top margin since we removed the main header */
.layout-container {
    margin-top: 0;
}

/* Make sure sidebar-header is consistent in both cards */
.main-content .sidebar-header {
    border-bottom: 1px solid var(--jade-lite);
    padding-bottom: 15px;
    margin-bottom: 0; /* Removed bottom margin */
}

/* Add special styling for the hero title in the right card */
.main-content .sidebar-header.hero-title {
    padding: 25px;
    border-bottom: 1px solid var(--jade-lite);
    padding-bottom: 15px;
}

.main-content .sidebar-header.hero-title h1 {
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    text-align: left;
    flex-grow: 1;
}

/* Add bottom margin to sidebar */
.sidebar {
    margin-bottom: 20px;
}

/* Adjust scrollable container to remove top inset */
.boxplot-scroll-container {
    background-color: transparent;
    position: absolute;
    inset: 0px 0px 60px;
}

/* Ensure placeholder is below the header */
.placeholder {
    text-align: center;
    color: var(--soil);
    padding: 20px 0; /* Reduced padding */
    font-size: 1.2rem;
}

/* Legal disclaimer footer section */
.legal-disclaimer {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--papyrus);
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--camber-black);
}

.legal-disclaimer p {
    margin-bottom: 15px;
}

.legal-disclaimer .sources {
    font-size: 0.8rem;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--taupe);
}

.legal-disclaimer .sources p {
    margin: 5px 0;
}

/* Header with logos and title layout */
.header-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 10px;
}

.logo-top {
    margin-bottom: 10px;
}

.logo-top img {
    max-width: 200px;
    height: auto;
}

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.powered-by {
    flex-shrink: 0;
    margin-left: 15px;
}

.powered-by img {
    width: 200px;
    height: auto;
    vertical-align: bottom;
}

/* Update hero title to work with the new layout */
.main-content .sidebar-header.hero-title h1 {
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    text-align: left;
    flex-grow: 1;
}

@media (max-width: 600px) {
    .title-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .powered-by {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .logo-top img, .powered-by img {
        max-width: 150px;
    }
} 