/**
 * MLR Member System - Responsive Styles
 *
 * @package MLR_Member_System
 * @since 1.0.0
 */

/* Tablet - Max 768px */
@media (max-width: 768px) {
    .mlr-dashboard-wrapper {
        padding: 1rem 0.5rem;
    }

    .mlr-dashboard-header {
        padding: 1.5rem 1rem;
    }

    .mlr-user-welcome {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .mlr-user-info h1 {
        font-size: 1.5rem;
    }

    .mlr-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .mlr-dashboard-nav {
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .mlr-nav-item {
        flex-direction: column;
        padding: 0.75rem 1rem;
        gap: 0.25rem;
        font-size: 0.85rem;
    }

    .mlr-nav-label {
        display: none;
    }

    .mlr-booking-card {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }

    .mlr-booking-actions {
        grid-column: 2;
        flex-direction: row;
        margin-top: 1rem;
    }

    .mlr-packages-grid {
        grid-template-columns: 1fr;
    }

    .mlr-package-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .mlr-section h2 {
        font-size: 1.25rem;
    }
}

/* Mobile - Max 480px */
@media (max-width: 480px) {
    .mlr-dashboard-header {
        padding: 1rem;
    }

    .mlr-user-avatar img {
        width: 60px;
        height: 60px;
    }

    .mlr-user-info h1 {
        font-size: 1.3rem;
    }

    .mlr-quick-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .mlr-stat-card {
        padding: 0.75rem;
    }

    .mlr-stat-icon {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }

    .mlr-stat-value {
        font-size: 1.5rem;
    }

    .mlr-stat-label {
        font-size: 0.8rem;
    }

    .mlr-dashboard-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .mlr-dashboard-nav::-webkit-scrollbar {
        display: none;
    }

    .mlr-nav-item {
        padding: 0.75rem;
        min-width: 60px;
    }

    .mlr-dashboard-content {
        padding: 1rem;
    }

    .mlr-booking-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .mlr-booking-date {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .mlr-booking-day {
        font-size: 1.5rem;
    }

    .mlr-booking-month {
        font-size: 1rem;
        align-self: flex-end;
        padding-bottom: 0.25rem;
    }

    .mlr-booking-info {
        justify-content: center;
    }

    .mlr-booking-actions {
        grid-column: 1;
        flex-direction: column;
        align-items: stretch;
    }

    .mlr-booking-actions .mlr-button {
        width: 100%;
    }

    .mlr-package-card {
        padding: 1rem;
    }

    .mlr-package-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .mlr-package-actions {
        flex-direction: column;
    }

    .mlr-package-actions .mlr-button {
        width: 100%;
    }

    .mlr-activity-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .mlr-activity-icon {
        width: 36px;
        height: 36px;
    }

    .mlr-button {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .mlr-section h2 {
        font-size: 1.2rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .mlr-button,
    .mlr-nav-item,
    .mlr-cancel-booking,
    .mlr-rebook {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }

    .mlr-booking-card,
    .mlr-package-card {
        -webkit-tap-highlight-color: rgba(231, 76, 60, 0.1);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mlr-dashboard-header,
    .mlr-dashboard-nav,
    .mlr-dashboard-content {
        background: #2c3e50;
        color: #ecf0f1;
    }

    .mlr-user-info h1,
    .mlr-section h2,
    .mlr-booking-details h3,
    .mlr-package-title,
    .mlr-activity-title {
        color: #ecf0f1;
    }

    .mlr-member-since,
    .mlr-stat-label,
    .mlr-booking-time,
    .mlr-progress-label,
    .mlr-activity-description,
    .mlr-activity-time {
        color: #95a5a6;
    }

    .mlr-stat-card,
    .mlr-activity-item {
        background: #34495e;
    }

    .mlr-booking-card,
    .mlr-package-card {
        border-color: #34495e;
        background: #2c3e50;
    }

    .mlr-booking-card:hover,
    .mlr-package-card:hover {
        border-color: #e74c3c;
        background: #34495e;
    }

    .mlr-nav-item:hover {
        background: #34495e;
        color: #ecf0f1;
    }

    .mlr-progress-bar {
        background: #34495e;
    }

    .mlr-button-secondary {
        background: #34495e;
        color: #ecf0f1;
    }

    .mlr-button-secondary:hover {
        background: #2c3e50;
    }
}

/* Print styles */
@media print {
    .mlr-dashboard-nav,
    .mlr-booking-actions,
    .mlr-package-actions,
    .mlr-button {
        display: none !important;
    }

    .mlr-dashboard-wrapper {
        max-width: 100%;
    }

    .mlr-dashboard-header,
    .mlr-dashboard-content {
        box-shadow: none;
        border: 1px solid #e1e8ed;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .mlr-booking-card,
    .mlr-package-card,
    .mlr-dashboard-header,
    .mlr-dashboard-nav,
    .mlr-dashboard-content {
        border: 2px solid currentColor;
    }

    .mlr-button-primary {
        border: 2px solid #fff;
    }

    .mlr-nav-item.active {
        border: 2px solid #fff;
    }
}
