/* Mobile-First CSS for @21mk_fitness */

/* Global text color override */


/* Global background color override for white/light backgrounds */
.modal-content,
.card,
.time-slot,
.calendar-container,
.table,
div[style*="background: white"],
div[style*="background-color: white"],
div[style*="background: #f8f9fa"],
div[style*="background-color: #f8f9fa"] {
    background: rgb(139, 131, 209) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

/* Exceptions for specific elements that need other colors */
.gold-accent,
.card-title.gold-accent,
h1.gold-accent,
h2.gold-accent,
h3.gold-accent {
    color: var(--primary-gold) !important;
}

.status-approved,
.status-pending,
.status-rejected,
.btn,
.alert {
    color: white !important;
}

:root {
    --primary-gold: #D4AF37;
    --primary-dark: #2C2C2C;
    --secondary-gold: #F4E04D;
    --light-gray: #F5F5F5;
    --medium-gray: #888;
    --white: #FFFFFF;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primary-dark);
    background-color: var(--light-gray);
}

/* Container */
.container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-gold) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--white);
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 120px);
}

/* Cards */
.card {
    background: rgb(139, 131, 209);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.card-header {
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    color: var(--primary-dark);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-bottom: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    color: var(--primary-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #404040;
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: auto;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Week Navigation */
.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgb(139, 131, 209);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.current-week-display {
    text-align: center;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.week-navigation .btn {
    width: auto;
    margin: 0;
}

.week-navigation .btn:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Class Schedule */
.schedule-day {
    margin-bottom: 1.5rem;
}

.day-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-gold) 100%);
    color: var(--white);
    padding: 0.75rem;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-name {
    font-size: 1rem;
    font-weight: 600;
}

.day-date {
    font-size: 0.875rem;
    opacity: 0.9;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.time-slots {
    /*background: var(--white);*/
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.time-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.time-slot:last-child {
    border-bottom: none;
}

.time-slot:hover {
    background-color: rgb(139, 131, 209);
}

.time-slot.unavailable {
    background-color: #f5f5f5;
    opacity: 0.7;
}

.time-slot.unavailable .time-text {
    color: var(--medium-gray);
}

.time-slot.unavailable .participants-count {
    color: var(--medium-gray);
}

.time-text {
    font-weight: 500;
    color: var(--primary-dark);
}

.participants-count {
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.select-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-gold);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background-color: var(--warning);
    color: #212529;
}

.status-approved {
    background-color: var(--success);
    color: var(--white);
}

.status-rejected {
    background-color: var(--danger);
    color: var(--white);
}

/* Booking summary */
.booking-summary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    color: var(--primary-dark);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.selected-classes {
    margin-top: 1rem;
}

.selected-class {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Responsive Design */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    
    .btn {
        width: auto;
        display: inline-block;
        margin-right: 0.5rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .card {
        padding: 2rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .schedule-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .schedule-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* Admin specific styles */
.admin-header {
    background: linear-gradient(135deg, var(--danger) 0%, var(--primary-dark) 100%);
}

.admin-card {
    border-left: 4px solid var(--danger);
}

/* Admin Calendar View */
.calendar-container {
    background: rgb(139, 131, 209);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(6, 1fr);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-gold) 100%);
    color: var(--white);
}

.time-column, .day-column {
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.day-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.calendar-date {
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.calendar-body {
    display: grid;
    grid-template-columns: 80px repeat(6, 1fr);
}

.time-slot-row {
    display: contents;
}

.time-label {
    padding: 1rem 0.5rem;
    background: rgb(139, 131, 209);
    color: black !important;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
    text-align: center;
    font-size: 0.875rem;
}

.calendar-cell {
    padding: 0.5rem;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    min-height: 80px;
    position: relative;
}

.calendar-cell.has-class {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-gold) 100%);
    color: var(--primary-dark);
}

.calendar-cell.no-class {
    background: rgb(139, 131, 209);
}

.participant-count {
    font-weight: bold;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.participant-list {
    font-size: 0.75rem;
    line-height: 1.2;
    max-height: 50px;
    overflow-y: auto;
}

.participant-name {
    display: block;
    margin-bottom: 0.1rem;
    padding: 0.1rem 0.25rem;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    font-size: 0.7rem;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #3a3828 !important;
    font-weight: bolder;
}

.participant-name:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateX(2px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-decoration: underline;
    color: var(--primary);
}

.admin-week-navigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* User Management Styles */
.user-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-total {
    background-color: #17a2b8;
    color: white;
}

.user-detail-section {
    background: rgb(139, 131, 209);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.booking-item {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.booking-item.pending {
    border-color: var(--warning);
    background: rgba(255, 193, 7, 0.1);
}

.booking-item.approved {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.1);
}

.booking-item.rejected {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgb(139, 131, 209);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--secondary);
    transform: scale(1.1);
}

.modal form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: rgb(139, 131, 209);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgb(139, 131, 209);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e1e5e9;
}

.form-actions .btn {
    min-width: 120px;
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal form {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

.booking-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.booking-actions .btn {
    flex: 1;
    min-width: 80px;
}

/* Table styles for admin */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: rgb(139, 131, 209);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-gold) 100%);
    color: var(--white);
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgb(139, 131, 209);
}

/* Mobile-specific styles */
@media (max-width: 575px) {
    .week-navigation {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem;
    }
    
    .week-navigation .btn {
        width: 100%;
        margin: 0;
    }
    
    .current-week-display {
        order: -1;
        font-size: 1rem;
    }
    
    .day-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .day-date {
        align-self: flex-end;
    }
    
    /* Admin Calendar Mobile */
    .calendar-header {
        grid-template-columns: 60px repeat(6, 1fr);
        font-size: 0.8rem;
    }
    
    .calendar-body {
        grid-template-columns: 60px repeat(6, 1fr);
    }
    
    .time-column, .day-column {
        padding: 0.5rem 0.25rem;
    }
    
    .calendar-date {
        font-size: 1rem;
        padding: 0.2rem 0.4rem;
    }
    
    .calendar-cell {
        padding: 0.25rem;
        min-height: 60px;
    }
    
    .participant-count {
        font-size: 0.75rem;
    }
    
    .participant-list {
        font-size: 0.65rem;
        max-height: 35px;
    }
    
    .admin-week-navigation {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-week-navigation .btn {
        width: 100%;
    }
}