/* Custom styles matching the old MSDS Portal design */

/* Font - Univers LT Std 57 Condensed - Web Font Files */
@font-face {
    font-family: "UniversLTStd57Condensed";
    src: url("../fonts/Univers/universltstd-cn-webfont.eot");
    src: local("☺"), 
         url("../fonts/Univers/universltstd-cn-webfont.woff") format("woff"), 
         url("../fonts/Univers/universltstd-cn-webfont.ttf") format("truetype"), 
         url("../fonts/Univers/universltstd-cn-webfont.svg#UniversLTStd57Condensed") format("svg");
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'UniversLTStd57Condensed', 'Arial Narrow', 'Helvetica Condensed', 'Liberation Sans Narrow', sans-serif;
    font-size: 16px;
    font-weight: normal;
    /* Green gradient background on sides only */
    background: linear-gradient(to bottom, rgb(48, 78, 93) 0%, rgb(77, 118, 124) 49%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
}

/* White center content area */
.center-content-wrapper {
    background: white;
    min-height: 100vh;
    max-width: 1545px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

/* Language bar styles */
.language-bar {
    background: white;
    padding: 10px 20px;
    text-align: right;
}

.language-bar .mud-button-root {
    color: #999;
    text-transform: none;
    font-weight: 700;
    font-size: 14px;
}

.language-bar .mud-button-root.active {
    color: #333;
    font-weight: 800;
}

/* Header styles - FIXED SIZES */
.msds-header {
    text-align: center;
    color: #027CAD;
    padding: 20px 20px 10px 20px;
    background: white;
}

.msds-header img {
    max-width: 400px; /* REDUCED from 600px */
    width: 80%;
    height: auto;
    margin-bottom: 15px;
}

.msds-header h3 {
    font-size: 28px; /* MATCHED to old website */
    font-weight: 800;
    margin: 15px 0 10px 0;
    color: #027CAD;
    line-height: 1.2;
}

.msds-header h4 {
    font-size: 20px; /* MATCHED to old website */
    font-weight: 700;
    margin: 10px 0 20px 0;
    color: #027CAD;
    line-height: 1.3;
}

/* Main content container */
.center-content {
    max-width: 1545px;
    margin: 0 auto;
    padding: 0 15px 30px 15px;
    background: white;
}

/* Search form styling - FIXED */
.search-form-container {
    background: #959595;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Input wrapper - must match button height exactly */
.search-form-container .mud-input {
    background: white !important;
    border-radius: 4px;
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.search-form-container .mud-input-root {
    background: white !important;
    border-radius: 4px;
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
}

/* Actual input element - must fill wrapper completely */
.search-form-container .mud-input-slot {
    background: white !important;
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    width: 100% !important;
    padding: 0 11px !important;
    margin: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    font-weight: 800;
    line-height: 43px !important;
}

.search-form-container .mud-input-control {
    height: 43px !important;
    min-height: 43px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Border element */
.search-form-container .mud-input-outlined-border {
    border-color: #fff !important;
    border-width: 1px !important;
}

.search-form-container .mud-input-root.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #027CAD !important;
}

.search-form-container .mud-input-root.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: #027CAD !important;
    border-width: 2px !important;
}

/* Remove MudBlazor label space */
.search-form-container .mud-input-label {
    display: none !important;
}

.search-form-container .mud-input-root-margin-dense {
    margin: 0 !important;
}

/* Remove any form helper text space */
.search-form-container .mud-input-helper-text {
    display: none !important;
}

.search-form-container .mud-button-filled-primary {
    background-color: #0479AF;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
    text-transform: none;
    padding: 10px 20px;
    height: 43px !important;
    min-height: 43px !important;
}

.search-form-container .mud-button-filled-primary:hover {
    background-color: #003e53;
}

/* Region dropdown styling */
.search-form-container .mud-select {
    background: white !important;
    border-radius: 4px;
}

.search-form-container .mud-select .mud-input {
    background: white !important;
    font-weight: 800;
    height: 25px;
}

.search-form-container .region-dropdown .mud-input-root {
    background: white !important;
}

/* Results filter styling */
.results-filter {
    font-weight: 800;
    margin: 30px 0 10px 0;
    padding: 10px 0;
}

.results-filter .display-text {
    display: inline-block;
    margin-right: 5px;
    margin-top: 8px;
    font-weight: 800;
    color: #333;
    vertical-align: middle;
}

.results-filter .display-text-right {
    display: inline-block;
    margin-left: 5px;
    margin-top: 8px;
    font-weight: 800;
    color: #333;
    vertical-align: middle;
}

.results-filter .mud-select {
    background: white;
    border-radius: 5px;
    border: 1px solid #000;
}

/* Alert styling */
.mud-alert {
    border-radius: 4px;
    font-weight: 700;
    margin-bottom: 20px;
}

.mud-alert-filled-info {
    background-color: #d9edf7;
    color: #31708f;
}

.mud-alert-filled-error {
    background-color: #f2dede;
    color: #a94442;
}

/* Table/DataGrid custom styling - FIXED HEADER */
.results-table-container {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.results-table-container .mud-table {
    background: transparent;
   /* table-layout:auto;
    width:100%;*/
}
/*
.results-table-container .mud-table-root {
        table-layout: fixed !important;
        width: 100%;
    }
*/
.results-table-container .mud-table-head {
    background: #003e53 !important; /* DARK TEAL HEADER - FIXED */
}

.results-table-container .mud-table-head .mud-table-cell {
    color: white !important;
    font-weight: 800;
    padding: 12px 10px;
    font-size: 14px;
    background: #003e53 !important; /* DARK TEAL HEADER - FIXED */
}

.results-table-container .mud-table-row:nth-child(odd) {
    background: #c2c2c2 !important; /* Grey for odd rows */
}

.results-table-container .mud-table-row:nth-child(even) {
    background: #FFF !important; /* White for even rows */
}

.results-table-container .mud-table-cell {
    padding: 10px;
    font-weight: 700;
    border-bottom: none;
}

.product-description {
    color: #797979;
    font-style: italic;
    font-size: 12px;
    display: inline;
    margin-top: 4px;
}

/* Download icon button styling */
.download-icon-button {
    color: #0479AF !important;
}

.download-icon-button:hover {
    background-color: rgba(4, 121, 175, 0.1) !important;
}

/* Download button styling */
.download-button {
    background-color: #0479AF;
    color: white;
    border-radius: 4px;
    padding: 6px 12px;
    text-decoration: none;
    display: inline-block;
}

.download-button:hover {
    background-color: #003e53;
    color: white;
}

.download-button .fa {
    margin-right: 5px;
}

/* Loading indicator */
.loading-container {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    margin: 20px 0;
}

/* No results message */
.no-results-container {
    text-align: center;
    padding: 30px;
    background: #d9edf7;
    border-radius: 4px;
    color: #31708f;
    margin: 20px 0;
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 1545px) {
    .center-content-wrapper {
        max-width: 100%;
        box-shadow: none;
    }
}

@media (max-width: 960px) {
    .msds-header h3 {
        font-size: 28px;
    }

    .msds-header h4 {
        font-size: 20px;
    }

    .search-form-container {
        padding: 10px;
    }
}

@media (max-width: 600px) {
    .msds-header img {
        max-width: 300px;
    }

    .msds-header h3 {
        font-size: 24px;
    }

    .msds-header h4 {
        font-size: 18px;
    }

    .search-form-container .mud-button-filled-primary {
        width: 100%;
        margin-top: 10px;
    }
}

/* Override MudBlazor defaults to match old design */
.mud-layout {
    background: transparent !important;
}

.mud-main-content {
    background: transparent !important;
    padding: 0 !important;
}

.mud-container {
    background: transparent;
}

/* MudAppBar override for language bar */
.mud-appbar {
    background: white !important;
}

/* Paper background for results */
.results-paper {
    background: white;
    padding: 20px;
    border-radius: 4px;
}

/* Document dropdown styling */
.document-dropdown {
    min-width: 200px;
}

.document-dropdown .mud-input {
    font-size: 0.875rem;
    padding: 8px 12px;
}

.document-dropdown .mud-select {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.document-dropdown .mud-input-slot {
    padding: 0;
}

.download-icon-button {
    color: #00693E !important;
}

.download-icon-button:hover {
    background-color: rgba(0, 105, 62, 0.1) !important;
}

/* Unavailable document link styling */
.link-unavailable {
    color: #d3d3d3 !important;
    font-style: italic !important;
}

/* MudBlazor select item styling for unavailable links */
.mud-list-item.link-unavailable,
.mud-list-item.link-unavailable .mud-list-item-text {
    color: #d3d3d3 !important;
    font-style: italic !important;
}

.mud-select-item.link-unavailable {
    color: #d3d3d3 !important;
    font-style: italic !important;
}

/* Target MudBlazor popover content for unavailable links */
.mud-popover .mud-list .mud-list-item.link-unavailable,
.mud-popover .mud-list .mud-list-item.link-unavailable * {
    color: #d3d3d3 !important;
    font-style: italic !important;
}

.no-wrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.max-shrink {
    flex-shrink: 10;
    width: 1%;
    min-width: 50px;
}
