/* Title: main.css
Copyright 2025 Wyoming State Geological Survey
*/
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@700&display=swap");

:root {
    --primary-dark: #2c3e50; /* Dark slate blue */
    --primary-accent: #b49b6b; /* Refined gold */
    --text-color-body: #34495e; /* Softer dark gray for text */
    --text-color-light: #ffffff;
    --background-light: #f8f9fa;
    --border-color: #dee2e6;
}

html {
    scroll-behavior: smooth;
}


h1 {
    text-align: center;
}

/* --- Main Page & Separators --- */
#container {
    margin: 0 auto !important;
    max-width: 1400px;
    width: 100%;
    padding: 2rem;
}

hr {
    border-top: 1px solid var(--border-color);
    opacity: 1;
}

.top-bar {
    font-family: "Merriweather", serif;
    font-style: normal;
    font-weight: 200;
}

#publicationsTable thead tr#filter-row th input {
    width: 100%;
    min-width: 140px;
    box-sizing: border-box;
}

/* --- Header / Navbar --- */
.navbar {
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    color: var(--primary-dark) !important;
}

/* logo in the navbar */
.navbar-logo {
    height: 40px;
    width: auto;
}

.banner-container {
    max-width: 400px;
    margin: 1rem auto;
}

.header-banner {
    width: 100%;
    height: auto;
    display: block;
}

#container {
    padding-top: 1rem !important;
}

.dt-search {
    margin-right: 0 !important;
}

.dt-input {
    padding: .15rem !important;
}

#dt-length-0 {
    margin-right: .25rem !important;
}

.custom-footer {
    background-color: #222222;
    border-top: 1px solid #444;
    padding: 3rem 2rem;
    font-family: "Inter", sans-serif;
    color: #cccccc;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 3rem auto;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* .dt-buttons {
    margin-left: 0.5rem;
} */

/* info link in table header */
.header-info-link {
    text-decoration: none;
    color: inherit;
    font-size: 0.9em;
    /* margin-left: 4px; */
    vertical-align: super;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.header-info-link:hover {
    opacity: 1; /* Make it fully visible on hover */
    text-decoration: underline;
}

.td-truncate .truncated-text {
    cursor: help; /* Moves the help cursor here */
    text-decoration: underline dotted #888;
}

.footer-column h4 {
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    font-family: "Merriweather", serif;
    text-decoration: underline;
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-middle {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.footer-logo {
    flex-basis: 100%;
    text-align: center;
}

.footer-logo img {
    max-width: 200px;
    height: auto;
}

.footer-contact {
    font-family: "Merriweather", serif;
    flex-basis: 100%;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .footer-middle {
        justify-content: center;
    }
    .footer-logo {
        flex-basis: auto;
        margin-right: 4rem;
    }
    .footer-contact {
        flex-basis: auto;
        text-align: left;
    }
}

/* Map Index link block */
.map-index-link-container {
    background-color: #f8f9fa;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    color: inherit;
}

.map-index-link-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    text-decoration: none !important;
}

.map-index-link-container h5,
.map-index-link-container p {
    color: inherit;
}

.map-index-link-container .link-text {
    color: #007bff;
}

.footer-separator {
    border: 0;
    border-top: 1px solid #444;
    margin: 0 auto 2rem auto;
    max-width: 1200px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.875rem;
}

.footer-bottom-links {
    font-family: "Merriweather", serif;
    text-decoration: underline;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

.footer-bottom-links a {
    color: #cccccc;
    text-decoration: none;
}

.footer-bottom-links a:hover {
    text-decoration: underline;
}

.footer-copyright {
    text-align: center;
}

/* --- Modal --- */
#detailsModal .modal-dialog {
    transition: all 0.2s ease-in-out;
}

#detailsModal .modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

#detailsModal .modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* fine-tune icon alignment within modal links */
#detailsModal .download-link .bi {
    vertical-align: -2px;
}

/* Modal improvements */
.modal-section-spacing {
    margin-top: 8px;
}

.modal-link-hover:hover {
    opacity: 0.8;
    text-decoration: none !important;
}

.copy-button {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
    font-size: 0.8em;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.copy-button:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.loading-spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #6c757d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Loading skeleton for initial data load */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}



/* Format icons in table */
.format-icons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.format-icons-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.format-icon-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.2s ease;
}

.format-icon-link:hover {
    color: #007bff;
    text-decoration: none;
}

.details-button {
    min-width: 70px;
    /* transition: all 0.2s ease-in-out; */
}

/* Hide format icons on small screens when table is narrow */
@media (max-width: 576px) {
    .format-icons-row {
        display: none;
    }
}

/* Better mobile layout */
@media (max-width: 576px) {
    #detailsModal .modal-dialog {
        margin: 0.5rem;
    }

    #detailsModal .download-link {
        display: block;
        /* padding: 4px 0; */
        /* font-size: 1.1em; */
    }

    #detailsModal .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* .modal-section-spacing {
        margin-top: 4px;
    } */

    #detailsModal br {
        display: none;
    }
}

/* Accordion enhancements for smoother transitions */
.accordion-collapse {
    transition: height 0.2s ease-in-out;
}

.accordion-body {
    transition: padding 0.2s ease-in-out;
}

/* Subtle hover effect for accordion title bar */
.accordion-button:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Style for "Details" text in intro to match button appearance */
.details-text {
    display: inline-block;
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #6c757d;
    background-color: transparent;
    border: 1px solid #6c757d;
    border-radius: 0.25rem;
    text-align: center;
    vertical-align: middle;
    min-width: 50px;
    /* transition: all 0.15s ease-in-out; */
}

.details-text:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Style to mimic table cell appearance for Pub ID text in intro */
.table-cell-mimic {
    display: inline-block;
    border: 1px solid #dee2e6;
    padding: 0.25rem 0.5rem;
}

/* Fixed width for reset button to prevent text change width shifts */
.reset-button {
    width: 55px;
}

/* Style to mimic search input appearance for "Search" text in intro */
.search-text-mimic {
    display: inline-block;
    padding: 0.125rem 0.25rem;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #495057;
    /* box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); */
}
