/* Gym Class Scheduler - Public Styles */

/* Container */
.gym-scheduler-container,
.gym-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* User Info */
.gym-user-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.gym-user-info h4 {
    margin: 0;
    color: #333;
}

.gym-credits-badge {
    background: #007bff;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: inline-block;
}

.gym-credits-badge .credits-available {
    font-size: 32px;
    font-weight: bold;
}

.gym-credits-badge .credits-total {
    font-size: 24px;
}

.gym-credits-badge small {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-top: 5px;
}

/* Schedule List */
.gym-schedule-list h3 {
    color: #333;
    margin-bottom: 20px;
}

.gym-day-section {
    margin-bottom: 40px;
}

.gym-date-header {
    color: #555;
    font-size: 20px;
    padding: 10px 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

/* Class Cards */
.gym-class-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gym-class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.gym-class-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.gym-class-header h5 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.gym-class-time {
    font-size: 16px;
    font-weight: bold;
    color: #007bff;
}

.gym-class-instructor {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin: 10px 0;
}

.gym-class-instructor .instructor-icon {
    font-size: 18px;
}

.gym-class-instructor .instructor-name {
    font-weight: 500;
}

.gym-class-capacity {
    margin: 15px 0;
}

.gym-class-capacity small {
    display: block;
    color: #6c757d;
    margin-top: 5px;
}

.gym-class-actions {
    text-align: center;
}

.gym-book-btn,
.gym-cancel-btn {
    width: 100%;
}

/* Profile Cards */
.gym-profile-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.gym-profile-card h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

/* Credits Display */
.gym-credits-display {
    text-align: center;
    padding: 20px;
}

.credits-circle {
    display: inline-block;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.credits-circle .credits-number {
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
}

.credits-circle .credits-total {
    font-size: 24px;
    opacity: 0.9;
}

/* Bookings List */
.gym-bookings-list {
    display: grid;
    gap: 15px;
}

.gym-booking-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.booking-info strong {
    color: #333;
    font-size: 16px;
}

.booking-info small {
    color: #6c757d;
}

/* Login Required */
.gym-login-required {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.gym-login-required a {
    color: #007bff;
    text-decoration: underline;
}

/* Toast Override */
.toast {
    min-width: 300px;
}

.toast-success {
    background-color: #28a745;
    color: white;
}

.toast-error {
    background-color: #dc3545;
    color: white;
}

/* Loading State */
.gym-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .gym-user-info {
        text-align: center;
    }
    
    .gym-credits-badge {
        display: block;
        margin-top: 15px;
    }
    
    .gym-class-card {
        margin-bottom: 15px;
    }
    
    .gym-calendar-grid {
        font-size: 12px;
    }
    
    .gym-calendar-day {
        min-height: 60px;
    }
    
    .gym-calendar-header h3 {
        font-size: 18px;
    }
}

/* Monthly Calendar Styles */
.gym-calendar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gym-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.gym-calendar-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.gym-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #dee2e6;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.gym-calendar-day-header {
    background: #007bff;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    font-size: 14px;
}

.gym-calendar-day {
    background: white;
    min-height: 100px;
    padding: 5px;
    position: relative;
    cursor: default;
}

.gym-calendar-day-empty {
    background: #f8f9fa;
}

.gym-calendar-day-today {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.gym-calendar-day-past {
    opacity: 0.6;
}

.gym-calendar-day-has-classes {
    cursor: pointer;
}

.gym-calendar-day-has-classes:hover {
    background: #e9ecef;
}

.gym-calendar-day-number {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    text-align: right;
    padding-right: 5px;
}

.gym-calendar-day-classes {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gym-calendar-class {
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gym-calendar-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.gym-calendar-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

/* ========== CALENDAR PROFESSIONAL REDESIGN ========== */
.gym-calendar-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gym-calendar-info-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.gym-calendar-user-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 28px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.user-card-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.user-card-label {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-card-value {
    font-size: 24px;
    font-weight: 800;
    margin-top: 4px;
}

.gym-calendar-credits-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 28px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(245, 87, 108, 0.3);
}

.credits-circle-big {
    text-align: center;
}

.credits-number-big {
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
}

.credits-label-big {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

.credits-text {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gym-calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

.gym-cal-nav-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.gym-cal-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    color: white !important;
}

.gym-cal-current-month {
    text-align: center;
}

.gym-cal-current-month h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 800;
    color: #1a202c;
}

.gym-cal-today-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #f7fafc;
    color: #667eea !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.gym-cal-today-btn:hover {
    background: #edf2f7;
    color: #764ba2 !important;
}

/* ========== MODAL PROFESSIONAL ========== */
.gym-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gym-modal-container {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gym-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gym-modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.gym-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gym-modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.gym-modal-body {
    padding: 28px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.gym-modal-classes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gym-modal-class-item {
    background: #f7fafc;
    border-radius: 16px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.gym-modal-class-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.gym-modal-class-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.gym-modal-class-time {
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 80px;
    text-align: center;
}

.gym-modal-class-info {
    flex: 1;
}

.gym-modal-class-info h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
}

.gym-modal-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gym-modal-badge-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.gym-modal-badge-danger {
    background: linear-gradient(135deg, #f56565 0%, #fc8181 100%);
    color: white;
}

.gym-modal-badge-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.gym-modal-badge-closed {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    color: white;
}

.gym-modal-class-time-info {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #718096;
    font-weight: 600;
}

.gym-modal-closed-message {
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px solid #fc8181;
    border-radius: 10px;
    color: #742a2a;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
}

.gym-modal-class-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.gym-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gym-modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.gym-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.gym-modal-btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #fc8181 100%);
    color: white;
}

.gym-modal-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.gym-modal-btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.gym-modal-btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

/* ========== TOAST PROFESSIONAL ========== */
.gym-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.gym-toast {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 320px;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gym-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
}

.gym-toast-success .gym-toast-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.gym-toast-error .gym-toast-icon {
    background: linear-gradient(135deg, #f56565 0%, #fc8181 100%);
    color: white;
}

.gym-toast-message {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}

/* Calendar Grid Updates */
.gym-calendar-grid {
    gap: 8px !important;
    margin-bottom: 20px;
}

.gym-calendar-day-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 12px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gym-calendar-day {
    background: white !important;
    padding: 12px !important;
    min-height: 120px !important;
    border-radius: 12px !important;
    border: 2px solid #e2e8f0 !important;
    transition: all 0.3s ease !important;
}

.gym-calendar-day-empty {
    background: #f7fafc !important;
    opacity: 0.3;
}

.gym-calendar-day-today {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%) !important;
    border: 2px solid #f56565 !important;
    box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.1) !important;
}

.gym-calendar-day-past {
    opacity: 0.5 !important;
    background: #fafafa !important;
}

.gym-calendar-day-has-classes:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2) !important;
    border-color: #667eea !important;
}

.gym-calendar-day-number {
    font-weight: 800 !important;
    font-size: 20px !important;
    margin-bottom: 8px !important;
    color: #2d3748 !important;
}

.gym-calendar-day-classes {
    gap: 6px !important;
}

.gym-calendar-class {
    padding: 8px 10px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}

.gym-calendar-class:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
}

.gym-calendar-legend {
    display: flex;
    gap: 24px;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ========== WAITLIST FRONTEND ========== */
.gym-booking-waitlist {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%) !important;
    border-left-width: 6px !important;
}

.gym-waitlist-badge-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.gym-waitlist-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

.gym-waitlist-position {
    padding: 6px 14px;
    background: white;
    color: #f5576c;
    border: 2px solid #f5576c;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
}

.gym-waitlist-notice {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff5f5;
    border-left: 3px solid #f5576c;
    border-radius: 6px;
    font-size: 12px;
    color: #742a2a;
    font-weight: 600;
}

.gym-booking-item {
    position: relative;
    transition: all 0.3s ease;
}

.gym-booking-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.booking-actions {
    margin-top: 12px;
}

/* Responsive waitlist */
@media (max-width: 768px) {
    .gym-waitlist-badge-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========== RESPONSIVE MOBILE PERFECTO ========== */
@media screen and (max-width: 768px) {
    /* Wrapper */
    .gym-calendar-wrapper {
        padding: 12px !important;
    }
    
    /* Info Header - Stack vertical */
    .gym-calendar-info-header {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin-bottom: 20px !important;
    }
    
    .gym-calendar-user-card,
    .gym-calendar-credits-card {
        padding: 20px !important;
        border-radius: 16px !important;
    }
    
    .user-card-icon {
        font-size: 36px !important;
    }
    
    .user-card-value {
        font-size: 20px !important;
    }
    
    .credits-number-big {
        font-size: 42px !important;
    }
    
    .credits-label-big {
        font-size: 13px !important;
    }
    
    .credits-text {
        font-size: 13px !important;
    }
    
    /* Navigation */
    .gym-calendar-navigation {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    
    .gym-cal-nav-btn {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
    }
    
    .gym-cal-current-month h2 {
        font-size: 22px !important;
    }
    
    /* Calendar Grid - Más compacto */
    .gym-calendar-grid {
        gap: 4px !important;
    }
    
    .gym-calendar-day-header {
        padding: 8px 4px !important;
        font-size: 11px !important;
    }
    
    .gym-calendar-day {
        padding: 6px !important;
        min-height: 80px !important;
    }
    
    .gym-calendar-day-number {
        font-size: 16px !important;
        margin-bottom: 4px !important;
    }
    
    .gym-calendar-class {
        padding: 4px 6px !important;
        font-size: 10px !important;
        border-radius: 6px !important;
    }
    
    /* Legend */
    .gym-calendar-legend {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    
    .legend-item {
        justify-content: center !important;
        font-size: 13px !important;
    }
    
    /* Modal - Pantalla completa en móvil */
    .gym-modal-overlay {
        padding: 0 !important;
        align-items: flex-end !important;
    }
    
    .gym-modal-container {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 90vh !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
    }
    
    .gym-modal-header {
        padding: 20px !important;
    }
    
    .gym-modal-title {
        font-size: 18px !important;
    }
    
    .gym-modal-body {
        padding: 20px !important;
        max-height: calc(90vh - 80px) !important;
    }
    
    .gym-modal-classes-list {
        gap: 16px !important;
    }
    
    .gym-modal-class-item {
        padding: 16px !important;
    }
    
    .gym-modal-class-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .gym-modal-class-time {
        width: 100% !important;
        text-align: center !important;
    }
    
    .gym-modal-class-info h4 {
        font-size: 18px !important;
    }
    
    .gym-modal-class-actions {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .gym-modal-btn {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
    }
    
    /* Toast - Más pequeño en móvil */
    .gym-toast-container {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
    }
    
    .gym-toast {
        min-width: auto !important;
        width: 100% !important;
        padding: 16px 20px !important;
    }
    
    .gym-toast-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }
    
    .gym-toast-message {
        font-size: 14px !important;
    }
}

/* ========== FORCE RESPONSIVE CALENDAR ========== */
@media screen and (max-width: 768px) {
    /* Asegurar que se aplique siempre */
    body .gym-calendar-wrapper {
        padding: 12px !important;
    }
    
    body .gym-calendar-info-header {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
    
    body .gym-calendar-navigation {
        flex-direction: column !important;
    }
    
    body .gym-cal-nav-btn {
        width: 100% !important;
    }
    
    body .gym-calendar-grid {
        gap: 4px !important;
    }
    
    body .gym-calendar-day {
        padding: 6px !important;
        min-height: 80px !important;
    }
    
    body .gym-calendar-day-header {
        padding: 8px 4px !important;
        font-size: 11px !important;
    }
    
    body .gym-modal-overlay {
        align-items: flex-end !important;
    }
    
    body .gym-modal-container {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
    }
}

/* ========== RESPONSIVE EXTRA SMALL (max 480px) ========== */
@media screen and (max-width: 480px) {
    .gym-calendar-wrapper {
        padding: 8px !important;
    }
    
    .gym-calendar-info-header {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .gym-calendar-user-card,
    .gym-calendar-credits-card {
        padding: 16px;
        border-radius: 16px;
    }
    
    .user-card-icon {
        font-size: 32px;
    }
    
    .user-card-label {
        font-size: 11px;
    }
    
    .user-card-value {
        font-size: 18px;
    }
    
    .credits-number-big {
        font-size: 36px;
    }
    
    .credits-label-big {
        font-size: 12px;
    }
    
    .credits-text {
        font-size: 12px;
    }
    
    .gym-calendar-navigation {
        padding: 12px;
    }
    
    .gym-cal-nav-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .gym-cal-current-month h2 {
        font-size: 20px;
    }
    
    .gym-cal-today-btn {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .gym-calendar-grid {
        gap: 3px;
    }
    
    .gym-calendar-day-header {
        padding: 6px 2px;
        font-size: 10px;
    }
    
    .gym-calendar-day {
        padding: 4px;
        min-height: 70px;
    }
    
    .gym-calendar-day-number {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .gym-calendar-class {
        padding: 3px 5px;
        font-size: 9px;
    }
    
    .gym-modal-header {
        padding: 16px;
    }
    
    .gym-modal-title {
        font-size: 16px;
    }
    
    .gym-modal-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .gym-modal-body {
        padding: 16px;
    }
    
    .gym-modal-class-item {
        padding: 14px;
    }
    
    .gym-modal-class-time {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .gym-modal-class-info h4 {
        font-size: 16px;
    }
    
    .gym-modal-badge {
        font-size: 11px;
        padding: 5px 12px;
    }
    
    .gym-modal-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-width: 768px) and (orientation: landscape) {
    .gym-calendar-info-header {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .gym-modal-overlay {
        align-items: center !important;
    }
    
    .gym-modal-container {
        border-radius: 20px !important;
        max-height: 85vh !important;
    }
    
    .gym-calendar-day {
        min-height: 60px !important;
    }
}

/* ========== FORCE MOBILE STYLES - MAX PRIORITY ========== */
@media only screen and (max-width: 768px) {
    /* Forzar wrapper móvil */
    .gym-calendar-wrapper,
    body .gym-calendar-wrapper,
    html body .gym-calendar-wrapper {
        padding: 12px !important;
        max-width: 100% !important;
    }
    
    /* Forzar info header */
    .gym-calendar-info-header,
    body .gym-calendar-info-header,
    html body .gym-calendar-info-header {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }
    
    /* Forzar navegación */
    .gym-calendar-navigation,
    body .gym-calendar-navigation,
    html body .gym-calendar-navigation {
        flex-direction: column !important;
        display: flex !important;
    }
    
    .gym-cal-nav-btn,
    body .gym-cal-nav-btn,
    html body .gym-cal-nav-btn {
        width: 100% !important;
        display: block !important;
    }
    
    /* Forzar grid compacto */
    .gym-calendar-grid,
    body .gym-calendar-grid,
    html body .gym-calendar-grid {
        gap: 4px !important;
    }
    
    .gym-calendar-day,
    body .gym-calendar-day,
    html body .gym-calendar-day {
        padding: 6px !important;
        min-height: 80px !important;
    }
    
    .gym-calendar-day-header,
    body .gym-calendar-day-header,
    html body .gym-calendar-day-header {
        padding: 8px 4px !important;
        font-size: 11px !important;
    }
    
    .gym-calendar-day-number,
    body .gym-calendar-day-number,
    html body .gym-calendar-day-number {
        font-size: 16px !important;
    }
    
    .gym-calendar-class,
    body .gym-calendar-class,
    html body .gym-calendar-class {
        padding: 4px 6px !important;
        font-size: 10px !important;
    }
    
    /* Forzar modal bottom sheet */
    .gym-modal-overlay,
    body .gym-modal-overlay,
    html body .gym-modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    
    .gym-modal-container,
    body .gym-modal-container,
    html body .gym-modal-container {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
    }
    
    .gym-modal-class-actions,
    body .gym-modal-class-actions,
    html body .gym-modal-class-actions {
        flex-direction: column !important;
    }
    
    .gym-modal-btn,
    body .gym-modal-btn,
    html body .gym-modal-btn {
        width: 100% !important;
    }
}

@media only screen and (max-width: 480px) {
    /* Extra pequeño */
    .gym-calendar-wrapper,
    body .gym-calendar-wrapper {
        padding: 8px !important;
    }
    
    .gym-calendar-day,
    body .gym-calendar-day {
        min-height: 70px !important;
        padding: 4px !important;
    }
    
    .gym-calendar-grid,
    body .gym-calendar-grid {
        gap: 3px !important;
    }
    
    .gym-calendar-day-header,
    body .gym-calendar-day-header {
        font-size: 10px !important;
        padding: 6px 2px !important;
    }
    
    .gym-calendar-day-number,
    body .gym-calendar-day-number {
        font-size: 14px !important;
    }
    
    .gym-calendar-class,
    body .gym-calendar-class {
        font-size: 9px !important;
        padding: 3px 5px !important;
    }
}

/* ── Botón Mi Cuenta [gym_account_button] ───────────────────────────── */
.gym-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 14px rgba(102,126,234,0.4);
}

.gym-account-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff !important;
}
