/* ========================================
    NMRehab 響應式和輔助樣式 (模組化 v2.6.1)
    變數和基礎樣式、工具類已移至:
    - variables.css (CSS 變數)
    - base.css (基礎樣式)
    - utilities.css (工具類)
    此檔案包含響應式設計和輔助功能樣式
    行數: 約327 行
    ======================================== */
.font-small {
    font-size: 14px !important;
}

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

.font-large {
    font-size: 18px !important;
}

.font-xlarge {
    font-size: 22px !important;
}

.font-xlarge .nav-button {
    font-size: 1.4rem !important;
}

.font-xlarge .message-content {
    font-size: 1.5rem !important;
}

.font-xlarge .quick-btn {
    font-size: 1.4rem !important;
}

/* 高�?比模�?*/
.high-contrast {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #ffff00;
}

.high-contrast .nav-button {
    border: 2px solid #000;
}

.high-contrast .quick-btn {
    border: 2px solid #000;
    color: #000 !important;
}

/* ?�畫禁用（�??��??�戶使用�?*/
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 語音視覺?��?�?*/
.voice-visualizer.enhanced {
    background: linear-gradient(45deg, #4db8a8, #3a9d8f, #4db8a8);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 互�??��?增強 */
.button-feedback {
    position: relative;
    overflow: hidden;
}

.button-feedback::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.button-feedback:active::after {
    width: 300px;
    height: 300px;
}

/* ?�訪?�性�?�?*/
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus ?��???*/
*:focus {
    outline: 3px solid #4db8a8;
    outline-offset: 2px;
}

/* ?��?式改??*/
@media (max-width: 1200px) {

    /* ?��??�左?��?欄�?度適??*/
    .left-sidebar {
        min-height: auto !important;
        max-height: 60vh !important;
        overflow-y: auto;
        position: relative !important;
        top: 0 !important;
    }

    /* ?��?概覽調整 */
    .schedule-overview {
        flex-direction: column;
        gap: 12px;
    }

    .overview-item {
        width: 100% !important;
    }

    /* ?��??��??��?調整 */
    .schedule-actions {
        flex-direction: column;
        gap: 8px;
    }

    .schedule-action-btn {
        width: 100%;
    }

    /* Grid調整????*/
    .schedule-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* 模�?框寬度調??*/
    .schedule-modal-content {
        width: 95%;
        margin: 3% auto;
    }
}

@media (max-width: 768px) {

    /* 主容?�調??*/
    .main-content {
        flex-direction: column;
    }

    .left-sidebar,
    .center-panel,
    .right-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Grid調整????*/
    .schedule-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* ?��?grid?�目調整 */
    .schedule-grid-item {
        padding: 16px;
    }

    .schedule-grid-icon {
        font-size: 2.5rem;
    }

    .schedule-grid-name {
        font-size: 1rem;
    }

    /* 模�?框調??*/
    .schedule-modal-body {
        padding: 16px;
        max-height: 70vh;
    }

    .schedule-modal-header h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .top-header {
        text-align: center;
    }

    .logo-section {
        flex-direction: column;
        gap: 0.5rem;
    }

    .voice-controls {
        padding: 1rem;
    }

    .voice-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* 小螢幕進�?步優??*/
    .left-sidebar {
        max-height: 50vh !important;
    }

    /* ?��?概覽?��?調整 */
    .schedule-label {
        font-size: 12px;
    }

    .form-control,
    .schedule-display {
        font-size: 13px;
        padding: 8px 10px;
    }

    /* ?��??��?調整 */
    .schedule-action-btn {
        font-size: 13px;
        padding: 10px 16px;
    }

    /* Grid?�目?��?步縮小�?�?*/
    .schedule-grid {
        gap: 8px;
    }

    .schedule-grid-item {
        padding: 12px;
    }

    .schedule-grid-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .schedule-grid-name {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .schedule-grid-info {
        font-size: 0.75rem;
    }

    .schedule-grid-count {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* 模�?框全屏�? */
    .schedule-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .schedule-modal-body {
        padding: 12px;
        max-height: calc(100vh - 80px);
    }

    .schedule-modal-header {
        padding: 16px;
    }

    .schedule-modal-header h3 {
        font-size: 1rem;
    }
}

/* 超�??��??��? (320px - 375px) */
@media (max-width: 375px) {
    .schedule-grid-icon {
        font-size: 1.8rem;
    }

    .schedule-grid-name {
        font-size: 0.85rem;
    }

    .schedule-grid-info {
        font-size: 0.7rem;
    }

    .schedule-action-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .schedule-action-btn i {
        font-size: 0.9rem;
    }
}

/* BGM ��ܼ˦� */
.bgm-display {
    color: #666;
    font-style: italic;
}

.bgm-display.has-bgm {
    color: var(--primary-color);
    font-style: normal;
    font-weight: 500;
}

.bgm-display i {
    margin-right: 6px;
    color: var(--primary-color);
}