html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.app-navbar {
    height: 45px;
    background-color: #0047AB; /* Deep Azure Blue */
    color: white;
    border-bottom: 0px solid #0047AB; /* strong accent */
}

    .app-navbar .navbar-brand,
    .app-navbar .nav-link,
    .app-navbar .navbar-text {
        color: #ffffff !important;
    }

.no-navbar-gap {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.app-body {
    padding-top: 12px;
}

.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;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 0px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Force Select2 to match Bootstrap width */
.select2-container {
    width: 100% !important;
}

/* Match Bootstrap input height */
.select2-selection--multiple {
    min-height: 38px !important;
    padding: 4px 6px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important; /* Bootstrap 5 radius */
}

/* Reduce spacing between selected tags */
.select2-selection__choice {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    padding: 2px 6px !important;
    font-size: 0.9rem !important;
}

/* Tighten spacing between dropdown options */
.select2-results__option {
    padding: 4px 8px !important;
    font-size: 0.95rem !important;
}

/* Match Bootstrap hover color */
.select2-results__option--highlighted {
    background-color: #0d6efd !important;
    color: white !important;
}

#dropZone:hover {
    background-color: #f8f9fa;
}

/* =========================
   USER MANAGEMENT TABLES
   ========================= */

/* Lock column geometry */
table.table {
    table-layout: fixed;
    width: 100%;
}

    /* Shared cell behavior */
    table.table th {
        font-size: 15px;
        font-weight: 600;
    }

    table.table td {
        vertical-align: middle !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 15px;
    }

/* Shared user table layout */
.user-table {
    table-layout: fixed;
    width: 100%;
}


    /* Headers */
    .user-table th {
        font-size: 15px;
        font-weight: 600;
    }

    /* Cells */
    .user-table td {
        vertical-align: middle !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 12px;
    }

.user-table-scroll {
    max-height: 250px;
    /*overflow-y: auto;*/
    border: 1px solid #dee2e6; /* matches Bootstrap table border */
    border-radius: 4px;
}

/* =========================
   COLUMN WIDTHS
   ========================= */
/* Name */
.userName-col {
    width: 80px;
    min-width: 80px;
    font-weight: bold;
    white-space: nowrap;
}

/* Email */
.email-col {
    width: 80px;
    min-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Since */
.since-col {
    width: 40px;
}

/* User Role (dropdown) */
.userType-col {
    width: 60px;
}

.password-col {
    width: 30px;
}

.userType-dropdown {
    width: 55px;
}

.update-btn,
.reset-btn {
    width: 60px;
    height: 25px;
    font-size: 12px;
    vertical-align: middle !important;
}

/* ============================
   Role-based dropdown colors
   ============================ */
/* base */
.role-select {
    width: 40px;
    font-weight: 600;
    color: #fff;
}

/* role colors – must override .form-select */
.form-select.role-owner {
    background-color: #e6fafa;
    color: #212529;
}

.form-select.role-superadmin {
    background-color: #dc3545;
    color: #fff;
}

.form-select.role-admin {
    background-color: #0d6efd;
    color: #fff;
}

.form-select.role-author {
    background-color: #198754;
    color: #fff;
}

.form-select.role-customer {
    background-color: #6c757d;
    color: #fff;
}
/* Book Submit Section */
.input-group-box {
    margin: 0;
    height: 80px;
    /*align-items: center;*/
}

.file-wrapper {
    display: flex;
    align-items: center;
    height: 30px;
}

.file-input {
    height: 30px !important;
    padding: 0 !important;
    line-height: 30px !important;
}

/* AUTHORBOOKS TABLES */
#authorBooksTable td {
    white-space: normal !important;
    word-wrap: break-word;
}

.text-right {
    padding-right: 5px;
}

.text-left {
    padding-left: 5px;
}

.wq-example {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    white-space: normal;
}

/* Fix DataTables horizontal scroll skew */
/*.dataTables_scrollBody {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

    .dataTables_scrollHeadInner,
    .dataTables_scrollBody table {
        margin-left: 0 !important;
    }*/

/* Back-to-top button */
#backToTopBtn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 52px;
    height: 52px;
    display: none; /* shown via .show */
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, #c98f5a 0%, #b07a3f 100%);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    z-index: 120000;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(176,122,63,0.35), 0 2px 6px rgba(0,0,0,0.4) inset;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
    opacity: 0.98;
}
#backToTopBtn.show { display: flex; opacity: 1; }
#backToTopBtn.hide { opacity: 0.6; }
#backToTopBtn:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 10px 26px rgba(176,122,63,0.45); }
#backToTopBtn:focus { outline: 3px solid rgba(255,255,255,0.9); }

/* Gentle pulse to draw attention without being distracting */
@keyframes bat-pulse {
    0% { box-shadow: 0 6px 18px rgba(176,122,63,0.25); }
    50% { box-shadow: 0 10px 26px rgba(176,122,63,0.35); }
    100% { box-shadow: 0 6px 18px rgba(176,122,63,0.25); }
}
#backToTopBtn.show { animation: bat-pulse 2.8s ease-in-out infinite; }

/* Smaller on very small screens */
@media (max-width: 480px) {
    #backToTopBtn { right: 12px; bottom: 12px; width: 44px; height: 44px; font-size: 18px; }
}

