/* Layout CSS - ASP.NET Core Web Application */

/* ===== BASE STYLES ===== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

* {
    box-sizing: border-box;
}

/* ===== RESPONSIVE BASE ===== */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* ===== OVERFLOW PREVENTION ===== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

.container,
.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

.hero-section,
.main-content,
[class*="container"] {
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== RESPONSIVE ELEMENTS ===== */
img,
video,
iframe,
table {
    max-width: 100%;
    height: auto;
}

.btn {
    max-width: 100%;
    word-wrap: break-word;
}

    /* ===== FOCUS STYLES ===== */
    .btn:focus,
    .btn:active:focus,
    .btn-link.nav-link:focus,
    .form-control:focus,
    .form-check-input:focus {
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
    }

/* ===== NAVBAR STYLES ===== */
#mainNavbar {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

    #mainNavbar .container-fluid {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        margin: 0;
    }

.navbar-brand {
    max-width: calc(100vw - 80px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-toggler {
    position: absolute;
    right: 15px;
    top: 15px; /* instead of 50% */
    transform: none; /* remove vertical centering transform */
    z-index: 1001;
}


.navbar-scrolled {
    background-color: rgba(94, 59, 238, 0.85) !important;
    transition: background-color 0.3s ease;
}

/* ===== RESPONSIVE NAVBAR ===== */
@media (max-width: 991.98px) {
    .navbar-brand {
        max-width: calc(100vw - 60px);
        margin-left: 0;
        padding-left: 0;
    }

    .navbar-toggler {
        right: 10px;
        padding: 4px 6px;
        font-size: 1rem;
    }

    .navbar-collapse {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        max-width: calc(100vw - 50px);
        font-size: 1rem;
    }

        .navbar-brand img {
            height: 25px;
            width: auto;
        }

    .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/* ===== TABLE STYLES ===== */
.table-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.table-subtitle {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

    .table-subtitle .text-primary {
        color: #e83e8c !important;
        font-family: 'Courier New', monospace;
    }

.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

    .table thead th {
        background-color: #f8f9fa;
        border-bottom: 2px solid #e9ecef;
        font-weight: 600;
        color: #495057;
        padding: 1rem;
    }

    .table tbody td {
        padding: 1rem;
        border-bottom: 1px solid #e9ecef;
        color: #495057;
    }

    .table tbody tr:last-child td {
        border-bottom: none;
    }

    .table tbody tr:hover {
        background-color: #f8f9fa;
    }

/* ===== TEXT STYLES ===== */
.username {
    color: #6c757d;
    font-family: 'Courier New', monospace;
}
