/* Base Styles */

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background-color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

main {
    flex: 1 0 auto;
}

/* Top Gray Header Styles */
:root { /* Define variables */
    --image-height: 36px;
    --title-height: 40px;
    --lateral-icon-margin: 40px;
}

.top-gray-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: calc(var(--image-height) * 2.0);
    background-color: #2B2B2B;
    width: 100%;
    position: relative;
}

/* Make sure both sides take equal space so logo stays centered */
.menu-icon-link,
.user-icon-link {
    flex: 1;
    min-width: 32px;
    display: flex;
    align-items: center;
}

.menu-icon-anchor {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    margin-left: var(--lateral-icon-margin);
}

.menu-icon {
    height: var(--image-height);
    width: auto;
    transition: color 0.2s;
}

.menu-icon-anchor:hover .menu-icon {
    color: #FFD700; /* Gold on hover */
}

.header-logo {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-gray-header img {
    height: var(--image-height);
}

.user-icon-link {
    justify-content: flex-end;
}

.user-icon-anchor {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

.user-icon {
    height: var(--image-height);
    margin-right: var(--lateral-icon-margin);
}

.user-icon-img {
    height: var(--image-height);
    margin-right: var(--lateral-icon-margin);
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ccc;
}

.user-icon-anchor:hover .user-icon {
    color: #FFD700;
}


/* Page Title Styles */
.page-title {
    min-height: calc(var(--title-height) * 2.0);
    background: linear-gradient(to right, black, red);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 5%;
    color: white;
    font-size: var(--title-height);
    font-weight: bold;
    box-sizing: border-box;
    overflow: visible;
}

/* Horizontal scroll wrapper for wide tables */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Footer Styles */
footer {
    flex-shrink: 0;
    background-color: #0a0a0a;
    width: 100%;
    padding: 0.9rem 0 0;
}

.footer-links-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 1rem 0.9rem;
}

.footer-links-row a {
    color: #bac6d9;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.footer-links-row a i {
    font-size: 1rem;
}

.footer-links-row a:hover {
    color: #c70a0a;
}

.footer-bottom {
    border-top: 1px solid #1e1e1e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: #555;
    padding: 0.6rem 5%;
    gap: 0.4rem;
}

.footer-bottom a {
    color: #555;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-bottom a:hover {
    color: #c70a0a;
}

@media (max-width: 600px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* TABLETS */
@media (max-width: 768px) {
    :root { /* Define variables */
        --image-height: 30px;
        --title-height: 40px;
        --lateral-icon-margin: 30px;
    }
}

/* MOBILE PHONES */
@media (max-width: 480px) {
    :root { /* Define variables */
        --image-height: 20px;
        --title-height: 30px;
        --lateral-icon-margin: 20px;
    }
    .page-title {
        padding: 8px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Small screens — reduce container side padding */
@media (max-width: 600px) {
    .info-container, .tmd-container, .edit-container,
    .apply-container, .list-container, .review-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}