/* ========== BODY ========== */
body {
    background-attachment: fixed;
    background-image: url('/static/img/earth.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, 'Liberation Sans', sans-serif;
    height: 100%;
    padding-bottom: 60px;
    padding-top: 60px;
}

    body.admin-page {
        padding-top: 0 !important;
    }

/* ========== MAIN CONTAINER ========== */
.main-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: auto;
    max-width: 1140px;
    padding: 20px;
    position: relative;
}

/* ========== MOBILE MAIN CONTAINER ========== */
.mobile-main-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* ========== OAKTREE LOGO ========== */
.oaktree-logo-link {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
}

.ecosearch-logo {
    max-height: 80px;
}

/* ========== TITLES ========== */
.ecosearch-title {
    font-family: 'Pacifico', cursive;
    font-size: 2.5rem;
    margin-top: -10px;
    margin-bottom: 0.25rem;
}

    .ecosearch-title a {
        color: inherit;
        text-decoration: none;
    }

        .ecosearch-title a:hover {
            color: #007bff;
            text-decoration: underline;
        }

.ecosearch-subtitle {
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
}

.ecosearch-title + .ecosearch-subtitle {
    margin-top: 4px; /* Adjust this value as needed for tightness */
}

/* ========== SEARCH FORM RADIO BUTTONS ========== */
.form-check-inline {
    display: inline-flex;
    align-items: center;
    margin-right: 0px;
}

.form-check-input {
    margin-right: 0.3em;
}

.form-check.form-check-inline {
    margin-right: 0rem !important; /* Reduce space between each group */
}

/* ========== SEARCH MENU ========== */
.searchmenu-bar {
    text-align: center;
    font-size: 0.95rem;
    margin: 8px 0 1rem 0;
}

.searchmenu-topics {
    line-height: 1.4;
}

.separator {
    margin: 0 8px;
}

/* ========== SEARCH RESULT CARD ========== */
.search-result-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

    .search-result-card:hover {
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    }

/* ========== SEARCH RESULTS TABLE ========== */
.searchresults-bar {
    margin-top: 1.5rem;
}

.searchtable-title {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

    .searchtable-title + .searchresults-bar {
        margin-top: 0 !important;
    }

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    color: #212529;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

.table td,
.table th {
    vertical-align: top;
    padding: 0.75rem;
    text-align: left;
}

.table .title-column {
    font-size: 1.05rem;
    font-weight: 500;
}

.table .metadata-column {
    font-size: 0.9rem;
    color: #666;
}

.table a {
    color: #007bff;
    text-decoration: none;
}

    .table a:hover {
        text-decoration: underline;
    }

/* ========== FOOTER ========== */
.footer {
    color: #666;
    font-size: 0.9rem;
}

    .footer a {
        color: #007bff;
        text-decoration: none;
    }

        .footer a:hover {
            text-decoration: underline;
        }

    .footer img {
        vertical-align: middle;
    }

/* ========== UTILITY CLASSES ========== */
.text-center {
    text-align: center;
}

a.active {
    color: #007bff;
    font-weight: bold;
    text-decoration: underline;
}

.input-group .form-control {
    min-width: 0;
}

/* Search form */
.search-form {
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.search-input-group {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
}

.search-input {
    flex: 1 1 0;
    min-width: 0;
    font-size: 1.25rem;
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 0.5rem 0 0 0.5rem;
}

.search-form-spacing {
    margin-top: 8px;
}

.input-group .btn, .search-input-group .btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 1.1rem;
    padding-left: 18px;
    padding-right: 18px;
    border-radius: 0 0.5rem 0.5rem 0;
    height: auto;
    /* Remove margin-top if present */
}

@media (max-width: 700px) {
    .search-form {
        max-width: 100%;
    }

    .search-input {
        font-size: 1rem;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ========== MOBILE NEWS TABLE ========== */
.searchtable-mobile .mobile-news-date {
    font-size: 0.96em;
    color: #999;
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: 0.01em;
}

.searchtable-mobile .mobile-news-title {
    font-size: 1.09em;
    font-weight: 500;
    margin-bottom: 2px;
    color: #212529;
    /* Keep text color as body text, override Bootstrap link if needed */
}

    .searchtable-mobile .mobile-news-title a {
        color: #212529;
        text-decoration: none;
        transition: color 0.15s;
    }

        .searchtable-mobile .mobile-news-title a:hover {
            color: #007bff;
            text-decoration: underline;
        }

.searchtable-mobile .mobile-news-source {
    font-size: 0.99em;
    color: #6c757d;
}

    .searchtable-mobile .mobile-news-source a {
        color: #6c757d;
        text-decoration: none;
        transition: color 0.15s;
    }

        .searchtable-mobile .mobile-news-source a:hover {
            color: #007bff;
            text-decoration: underline;
        }

/* ========== MOBILE HEADER LOGO & TITLE FLOW ========== */
.mobile-header {
    position: relative;
    min-height: 62px;
    margin-bottom: 0.5rem;
    padding-top: 0.1rem;
}

.mobile-oaktree-logo-link {
    float: right;
    margin-left: 12px;
    margin-bottom: 2px;
}

.ecosearch-title.mobile-title {
    font-family: 'Pacifico', cursive;
    font-size: 1.7rem;
    margin-top: 0.1rem;
    margin-bottom: 0.3rem;
    line-height: 1.2;
    word-break: break-word;
    margin-right: 60px;
}

@media (max-width: 600px) {
    .mobile-header {
        position: relative;
        min-height: 44px;
        padding-top: 0;
        display: flex;
        align-items: flex-start;
    }

    .ecosearch-logo {
        max-height: 52px;
    }

    .mobile-oaktree-logo-link {
        margin-left: 7px;
        margin-bottom: 0;
        position: absolute;
        right: 0;
        top: 0;
    }
}

.separator {
    margin: 0 3px;
}

.admin-table {
    table-layout: fixed;
    width: 100%;
    word-break: break-word;
}

.narrow-col {
    width: 24px;
    min-width: 20px;
    max-width: 28px;
    text-align: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (max-width: 600px) {
    .search-mobile-controls {
        font-size: 0.98rem;
    }

        .search-mobile-controls .form-check-label {
            font-size: 0.98rem;
        }

        .search-mobile-controls .form-check-input {
            width: 1em;
            height: 1em;
        }
}

.ecochat-response-box {
    background-color: #e8f0fe;
    border-radius: 14px;
    padding: 16px 20px;
    margin: 18px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #cbe4ee;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

    .ecochat-response-box .mb-3 {
        margin-bottom: .75rem;
    }

.ecochat-close-response {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 0.8rem;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    z-index: 10;
}

    .ecochat-close-response:hover {
        color: #0d6efd;
        text-decoration: underline;
    }

.ecochat-references {
    border-top: 1px solid #cbe4ee;
    margin-top: 1rem;
    padding-top: 0.25rem;
}

.ecochat-references-heading {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ecochat-references-list {
    font-size: 0.75rem;
    line-height: 1.4;
}

.ecochat-reference-item {
    margin-bottom: 0.25rem;
}

.ecochat-reference-meta {
    color: #6c757d;
}

.ecochat-reference-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

    .ecochat-reference-link:hover {
        text-decoration: underline;
    }

.ecochat-response-box hr {
    margin-top: 0.25rem;
    margin-bottom: 0.1rem;
    border: 0;
    border-top: 1px solid #cbe4ee;
}