/* ===== General Background ===== */

@font-face {
    font-family: 'Cooper Hewitt';
    font-style: normal;
    font-weight: normal;
    src: local('Cooper Hewitt'), url('/font/CooperHewitt-Book.otf') format('truetype');
}

body {
    background: #f8f6f3;
    font-family: 'Cooper Hewitt', 'Segoe UI', Roboto, sans-serif !important;
    color: #3e2f2f;
}

/* ===== Headings ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #3e2f2f;
}

/* ===== Buttons ===== */
.btn-gym {
    background: #c1a995;
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.6rem 1.5rem;
    border: none;
    transition: all 0.3s ease-in-out;
}

    .btn-gym:hover {
        background: #a38873;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(163, 136, 115, 0.4);
    }

.btn-gym-outline {
    background: transparent;
    border: 2px solid #c1a995;
    color: #c1a995;
    border-radius: 2rem;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

    .btn-gym-outline:hover {
        background: #c1a995;
        color: #fff;
    }

/* ===== Reservation Slot Buttons ===== */
.btn-slot-available {
    background: #fff8dc !important; /* pale yellow */
    color: #3e2f2f !important;
    border: 1px solid #e0d8a8 !important;
    transition: all 0.3s ease-in-out;
}

    .btn-slot-available:hover {
        background: #f5eecc !important;
        color: #3e2f2f !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(224, 216, 168, 0.4);
    }

.btn-slot-mine,
.btn-slot-mine:disabled {
    background: #c8e6c9 !important; /* pale green */
    color: #2e7d32 !important;
    border: 1px solid #a5d6a7 !important;
    cursor: default;
    opacity: 1 !important;
}

    .btn-slot-mine:hover {
        background: #c8e6c9 !important;
        color: #2e7d32 !important;
    }

.btn-slot-mine-cancellable {
    cursor: pointer !important;
}

    .btn-slot-mine-cancellable:hover {
        background: #a5d6a7 !important; /* slightly darker green on hover */
        color: #1b5e20 !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(165, 214, 167, 0.4);
    }

.btn-slot-unavailable,
.btn-slot-unavailable:disabled {
    background: #d3d3d3 !important; /* gray - time restriction or reserved by others */
    color: #6b6b6b !important;
    border: 1px solid #bdbdbd !important;
    cursor: not-allowed;
    opacity: 1 !important;
}

    .btn-slot-unavailable:hover {
        background: #d3d3d3 !important;
        color: #6b6b6b !important;
    }

.btn-slot-blocked,
.btn-slot-blocked:disabled {
    background: #6c757d !important; /* darker gray - blocked by admin */
    color: #fff !important;
    border: 1px solid #5a6268 !important;
    cursor: not-allowed;
    opacity: 1 !important;
}

    .btn-slot-blocked:hover {
        background: #6c757d !important;
        color: #fff !important;
    }

/* ===== Navbar ===== */
.navbar-gym {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

    .navbar-gym .navbar-brand {
        font-family: 'Georgia', serif;
        font-weight: bold;
        font-size: 1.4rem;
        color: #3e2f2f;
    }

    .navbar-gym .nav-link {
        color: #3e2f2f;
        font-weight: 500;
        transition: color 0.3s;
    }

        .navbar-gym .nav-link:hover {
            color: #a38873;
        }

/* ===== Tables ===== */
.table-gym {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

    .table-gym thead {
        background: #c1a995;
        color: #fff;
    }

    .table-gym th,
    .table-gym td {
        padding: 1rem;
        vertical-align: middle;
        border: none;
    }

    .table-gym tbody tr:nth-child(odd) {
        background: #f3ede8;
    }

/* ===== Cards ===== */
.card-gym {
    border-radius: 1.5rem;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: #fff;
    padding: 1.5rem;
}

/* ===== Background Sections ===== */
.bg-gym-gradient {
    background: linear-gradient(135deg, #f8f6f3, #e7dfd8);
    padding: 3rem 1rem;
    border-radius: 2rem;
}

/* ===== Forms ===== */
.form-gym input,
.form-gym select,
.form-gym textarea {
    border-radius: 1rem;
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    transition: border 0.3s, box-shadow 0.3s;
}

    .form-gym input:focus,
    .form-gym select:focus,
    .form-gym textarea:focus {
        border-color: #c1a995;
        box-shadow: 0 0 0 0.2rem rgba(193,169,149,0.25);
    }

.form-gym label {
    font-weight: 500;
    color: #3e2f2f;
    margin-bottom: 0.3rem;
}

/* ===== Links ===== */
a {
    color: #a38873;
    text-decoration: none;
    transition: color 0.2s ease;
}

    a:hover {
        color: #7b5c47;
    }

/* ===== Footer fix for content overlap ===== */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container:has(main) {
    flex: 1;
    padding-bottom: 80px; /* Space for fixed footer */
}

footer.fixed-bottom {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

/* ===== Member Details Mobile Optimization ===== */
.member-details-table {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    /* Make user info inputs stack vertically on mobile */
    .member-details-user-info .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Responsive table wrapper with horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Compact table styling for mobile */
    .member-details-table {
        font-size: 0.75rem;
        min-width: 800px; /* Allows horizontal scroll but maintains readability */
    }

    .member-details-table th,
    .member-details-table td {
        padding: 0.5rem 0.3rem !important;
        white-space: nowrap;
    }

    .member-details-table .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }

    .member-details-table .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.7rem;
    }

    .member-details-table .btn-sm i {
        font-size: 0.8rem;
    }

    /* Card header buttons on mobile */
    .card-header .btn-gym {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .card-header .btn-gym i {
        font-size: 0.9rem;
    }

    /* Action buttons at bottom */
    .member-details-actions .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
        margin-bottom: 0.5rem;
        width: 100%;
    }
}

/* ===== Dashboard Styles ===== */
.date-picker-input {
    width: auto;
    min-width: 140px;
    display: inline-block;
}

.opening-hours-badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

.dashboard-table {
    font-size: 0.95rem;
}

.dashboard-table .time-column {
    white-space: nowrap;
    width: 60px;
    min-width: 60px;
    font-weight: 600;
}

.dashboard-table .service-column {
    min-width: 100px;
    text-align: center;
    position: relative;
}

/* Desktop: normal horizontal text, centered */
.dashboard-table .service-column .service-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    text-align: center;
}

.dashboard-table .reservation-cell {
    min-width: 80px;
    text-align: center;
    vertical-align: middle;
    font-size: 0.85rem;
}

.dashboard-table .reservation-cell.reserved {
    background-color: #c8e6c9;
}

.dashboard-table .reservation-cell.available {
    background-color: #fff8dc;
}

.dashboard-table .reservation-cell.available:hover {
    background-color: #f5eecc;
}

.dashboard-table .reservation-cell.reserved:hover {
    background-color: #a5d6a7;
}

.dashboard-table .reservation-cell.blocked {
    background-color: #6c757d !important;
    color: #fff !important;
    cursor: not-allowed;
}

/* Visit cards for mobile */
.visit-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease;
}

.visit-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.visit-card .card-header {
    background-color: #f8f6f3;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

.visit-card .card-body {
    background-color: #fff;
    padding: 0.75rem 1rem;
}

/* ===== Mobile Responsive Styles ===== */
@media (max-width: 576px) {
    .date-picker-input {
        min-width: 120px;
        padding: 0.375rem 0.5rem;
    }

    .opening-hours-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        display: inline-block;
        margin-top: 0.5rem;
    }

    .dashboard-table {
        font-size: 0.7rem;
    }

    .dashboard-table .time-column {
        width: 40px;
        min-width: 40px;
        padding: 0.4rem 0.2rem !important;
        font-size: 0.7rem;
    }

    .dashboard-table .service-column {
        min-width: 35px;
        width: 35px;
        padding: 0.3rem 0.1rem !important;
        height: 120px;
        vertical-align: middle;
        text-align: center;
    }

    /* Rotated text for mobile only */
    .dashboard-table .service-column .service-header-wrapper {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: rotate(180deg);
        white-space: nowrap;
        font-size: 0.75rem;
        padding: 0.3rem 0;
        min-height: 100px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin: 0 auto;
    }

    .dashboard-table .reservation-cell {
        min-width: 35px;
        width: 35px;
        padding: 0.3rem 0.1rem !important;
        font-size: 0.65rem;
    }

    .dashboard-table .reservation-cell strong {
        font-size: 0.65rem;
        word-break: break-word;
        line-height: 1.1;
    }

    .dashboard-table .reservation-cell .text-muted {
        font-size: 0.8rem;
    }

    .dashboard-table .reservation-cell i {
        font-size: 0.7rem;
    }

    .dashboard-table th,
    .dashboard-table td {
        padding: 0.3rem 0.1rem !important;
    }

    .btn-gym,
    .btn-gym-outline {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    h3 {
        font-size: 1.4rem;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .dashboard-table .time-column {
        width: 50px;
        min-width: 50px;
        padding: 0.5rem 0.3rem !important;
    }

    .dashboard-table .service-column {
        min-width: 50px;
        width: 50px;
        padding: 0.4rem 0.2rem !important;
        height: 110px;
        vertical-align: middle;
        text-align: center;
    }

    /* Rotated text for tablet only */
    .dashboard-table .service-column .service-header-wrapper {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: rotate(180deg);
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 0.4rem 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin: 0 auto;
    }

    .dashboard-table .reservation-cell {
        min-width: 50px;
        width: 50px;
        padding: 0.4rem 0.2rem !important;
        font-size: 0.75rem;
    }

    .dashboard-table .reservation-cell strong {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        margin: 0 -0.75rem;
    }
}
