/* ===================================
   RESPONSIVE STYLES FOR ALL PAGES
   =================================== */

/* Mobile-first approach with breakpoints:
   - Mobile: < 768px
   - Tablet: 768px - 1024px
   - Desktop: > 1024px
*/

/* ===================================
   GLOBAL RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 768px) {
    /* Adjust body padding for mobile (no sidebar offset) */
    body {
        padding-left: 24px !important;
        padding-right: 24px !important;
        padding-top: 80px !important; /* More space for header */
    }

    /* Ensure content doesn't get hidden under header */
    .content {
        margin-left: 0 !important;
        padding-top: 24px !important;
    }
}

/* ===================================
   DASHBOARD RESPONSIVE STYLES
   =================================== */

@media (max-width: 768px) {
    /* Stats grid - stack vertically */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Stat cards - optimize spacing */
    .stat-card {
        padding: 14px !important;
    }

    .stat-icon {
        width: 35px !important;
        height: 35px !important;
    }

    .stat-info h3 {
        font-size: 13px !important;
    }

    .stat-info p {
        font-size: 20px !important;
    }

    /* Device cards - stack vertically */
    .devices-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .device-card {
        padding: 20px !important;
    }

    .device-title {
        font-size: 16px !important;
    }

    /* Chart container - adjust height */
    .chart-container {
        height: 80px !important;
    }

    /* Volume controls - better mobile layout */
    .volume-control {
        gap: 10px !important;
    }

    .volume-control svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Transmit button - adjust size */
    .transmit-btn {
        padding: 10px !important;
        font-size: 13px !important;
    }

    .transmit-btn svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Audio visualizer - reduce size */
    .audio-visualizer {
        height: 30px !important;
    }

    .audio-visualizer .bar {
        width: 3px !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .stat-card {
        gap: 12px !important;
    }

    .device-card {
        padding: 16px !important;
        gap: 16px !important;
    }
}

/* ===================================
   DEVICE ACTIVITY RESPONSIVE STYLES
   =================================== */
/* 
@media (max-width: 768px) {
    .overview-header {
        font-size: 20px !important;
    }

    .overview-header svg {
        width: 24px !important;
        height: 24px !important;
    }

    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .chart-card {
        padding: 20px !important;
    }

    .chart-card h2 {
        font-size: 16px !important;
    }

    .chart-wrapper {
        height: 250px !important;
    }
}

@media (max-width: 480px) {
    .chart-wrapper {
        height: 200px !important;
    }

    .chart-card {
        padding: 16px !important;
    }
}
 */
/* ===================================
   LOGIN PAGE RESPONSIVE STYLES
   =================================== */

@media (max-width: 768px) {
    .s-container {
        width: 95% !important;
        padding: 30px 20px !important;
        margin: 10px !important;
    }

    .title {
        font-size: 1.5rem !important;
        margin-bottom: 24px !important;
    }

    .mosaique-logo {
        width: 100px !important;
        margin-bottom: 24px !important;
    }

    .input-field {
        padding: 12px !important;
        font-size: 14px !important;
    }

    .btn {
        padding: 12px !important;
        font-size: 14px !important;
    }

    .mosaique-text {
        font-size: 3rem !important;
    }

    .sound-wave {
        width: 80px !important;
        height: 25px !important;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.3rem !important;
    }

    .mosaique-logo {
        width: 80px !important;
    }

    .mosaique-text {
        font-size: 2.5rem !important;
    }
}

/* ===================================
   PROFILE PAGE RESPONSIVE STYLES
   =================================== */

@media (max-width: 968px) {
    .profile-card {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        padding: 32px !important;
    }

    .profile-info-column {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color) !important;
        padding-right: 0 !important;
        padding-bottom: 32px !important;
    }

    .profile-picture {
        width: 90px !important;
        height: 90px !important;
    }

    .profile-header h2 {
        font-size: 22px !important;
    }

    .profile-header p {
        font-size: 15px !important;
    }
}

@media (max-width: 768px) {
    .profile-card {
        padding: 24px !important;
        gap: 24px !important;
    }

    .profile-picture {
        width: 80px !important;
        height: 80px !important;
    }

    .profile-header h2 {
        font-size: 20px !important;
    }

    .profile-header p {
        font-size: 14px !important;
    }

    .detail-item {
        padding: 10px !important;
        font-size: 13px !important;
    }

    .password-update-column h3 {
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }

    .form-group {
        margin-bottom: 14px !important;
    }

    .form-group label {
        font-size: 13px !important;
    }

    .form-input {
        padding: 10px !important;
        font-size: 13px !important;
    }

    .update-btn {
        padding: 10px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .profile-card {
        padding: 20px !important;
    }

    .profile-info-column {
        padding-bottom: 24px !important;
    }

    .profile-picture {
        width: 70px !important;
        height: 70px !important;
    }
}

/* ===================================
   SETTINGS PAGE RESPONSIVE STYLES
   =================================== */

@media (max-width: 968px) {
    .settings-card {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        padding: 32px !important;
    }

    .general-settings-column {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color) !important;
        padding-right: 0 !important;
        padding-bottom: 32px !important;
    }
}

@media (max-width: 768px) {
    .settings-card {
        padding: 24px !important;
        gap: 24px !important;
    }

    .general-settings-column h3,
    .audio-settings-column h3 {
        font-size: 18px !important;
    }

    /* Horizontal slider adjustments */
    .horizontal-slider-wrapper {
        height: 18px !important;
    }

    .horizontal-slider-thumb {
        width: 14px !important;
        height: 28px !important;
    }

    .horizontal-slider-group label {
        font-size: 13px !important;
    }

    /* Audio sliders - adjust grid */
    .audio-sliders-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }

    .slider-group {
        max-width: 100% !important;
    }

    .vertical-slider-wrapper {
        height: 120px !important;
        width: 18px !important;
    }

    .vertical-slider-thumb {
        width: 28px !important;
        height: 14px !important;
    }

    .slider-group label {
        font-size: 13px !important;
    }

    .slider-value {
        font-size: 13px !important;
    }

    .settings-btn {
        padding: 10px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .settings-card {
        padding: 20px !important;
    }

    .general-settings-column {
        padding-bottom: 24px !important;
    }

    /* Stack audio sliders vertically on very small screens */
    .audio-sliders-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .vertical-slider-wrapper {
        height: 100px !important;
    }
}

/* ===================================
   SIDEBAR RESPONSIVE ENHANCEMENTS
   =================================== */

@media (max-width: 768px) {
    /* Ensure sidebar text is always visible on mobile when open */
    .nav.mobile-show .nav-name,
    .nav.mobile-show .nav-logo-name,
    .nav.mobile-show .nav-subtitle {
        opacity: 1 !important;
        width: auto !important;
        margin-left: 10px !important;
    }

    /* Adjust nav link padding for mobile */
    .nav-link {
        padding: 10px 20px !important;
    }

    /* Header adjustments */
    .header {
        height: 60px !important;
    }

    .header-logo {
        font-size: 1.1rem !important;
    }

    .header-toggle {
        font-size: 1.6rem !important;
    }
}

/* ===================================
   UTILITY CLASSES FOR TOUCH DEVICES
   =================================== */

@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for better mobile UX */
    .nav-link,
    .transmit-btn,
    .settings-btn,
    .update-btn,
    .btn {
        min-height: 44px !important;
    }

    /* Improve slider touch interaction */
    .horizontal-slider-thumb,
    .vertical-slider-thumb {
        width: 20px !important;
        height: 20px !important;
    }
}

/* ===================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   =================================== */

@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding-top: 70px !important;
    }

    .chart-wrapper {
        height: 180px !important;
    }

    .vertical-slider-wrapper {
        height: 100px !important;
    }
}

/* ===================================
   PRINT STYLES (OPTIONAL)
   =================================== */

@media print {
    .nav,
    .header,
    .transmit-btn,
    .settings-btn,
    .update-btn {
        display: none !important;
    }

    .content {
        margin-left: 0 !important;
    }

    body {
        padding: 0 !important;
    }
}
