/**
 * 會員區塊共用樣式
 * 包含 Breadcrumb、Menu 等通用元件的 RWD
 *
 * 注意：.rbt-tutor-information 的 position:absolute 定位
 *       來自框架 styles.css，此處僅做微調不覆蓋定位邏輯
 */

/* ========================================
   Dashboard Content Wrapper（確保相對定位）
   ======================================== */
.rbt-dashboard-content-wrapper {
    position: relative;
    margin-bottom: 30px;
}

/* ========================================
   Dashboard 整體 — 統一背景，移除巢狀框框
   ======================================== */

/* 外層區域白底 */
.rbt-dashboard-area {
    background: #f8fafc;
}

/* 主內容區 — 移除框框，直接呈現 */
.rbt-dashboard-content.rbt-shadow-box {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.04) !important;
    border: none !important;
    border-radius: 14px !important;
}

/* 內層 content 不需要額外 padding/border */
.rbt-dashboard-content .content {
    padding: 0;
}

/* ========================================
   背景圖片區域
   ======================================== */
.tutor-bg-photo.height-350 {
    height: 350px;
    background-size: cover;
    background-position: center center;
}

/* ========================================
   Tutor Information (頭像+名稱區)
   頭像在上方，身分別+名稱在下方（垂直排列）
   ======================================== */
.rbt-tutor-information {
    justify-content: center !important;
}

.rbt-tutor-information .rbt-tutor-information-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 0.75rem;
}

/* 頭像 - 強制正圓形 150px（!important 覆蓋框架預設） */
.rbt-tutor-information-left .thumbnail.rbt-avatars.size-lg {
    flex-shrink: 0;
    width: 150px !important;
    height: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    border-radius: 50% !important;
    overflow: hidden;
}

.rbt-tutor-information-left .thumbnail.rbt-avatars.size-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.rbt-tutor-information-left .tutor-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.rbt-tutor-information-left .tutor-content .title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.rbt-tutor-information-left .tutor-content .badge {
    text-shadow: none;
}

/* ========================================
   會員選單 — 現代化設計
   ======================================== */

/* 側邊欄容器 — 移除漸層邊框，乾淨白底 */
.rbt-default-sidebar.rbt-gradient-border {
    border: none !important;
    background: #fff !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.04) !important;
    padding: 20px 16px !important;
}

/* 移除 gradient border ::before/::after 偽元素 */
.rbt-default-sidebar.rbt-gradient-border::before,
.rbt-default-sidebar.rbt-gradient-border::after {
    display: none !important;
}

/* 歡迎訊息 */
.rbt-default-sidebar .user-welcome-message {
    font-size: 14px;
    color: #64748b;
}

.rbt-default-sidebar .user-welcome-message strong {
    color: #1e293b;
    font-weight: 700;
}

/* 區塊標題 */
.rbt-default-sidebar .section-title {
    background: transparent !important;
    margin-top: 20px !important;
    margin-bottom: 8px !important;
    padding-bottom: 0;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.rbt-default-sidebar .section-title:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0 !important;
}

.rbt-default-sidebar .section-title h6 {
    background: transparent !important;
    padding: 0;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #94a3b8 !important;
    margin: 0;
}

/* 導航清單 */
.dashboard-mainmenu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-mainmenu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none !important;
    border-left: 3px solid transparent;
    margin-bottom: 2px;
}

.dashboard-mainmenu li a i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity 0.2s ease;
}

.dashboard-mainmenu li a:hover {
    background-color: #eef2ff;
    color: #4f46e5;
    border-left-color: #4f46e5;
}

.dashboard-mainmenu li a:hover i {
    opacity: 1;
    color: #4f46e5;
}

.dashboard-mainmenu li a.active {
    background-color: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
    border-left-color: #4f46e5;
}

.dashboard-mainmenu li a.active i {
    opacity: 1;
    color: #4f46e5;
}

/* 登出按鈕 */
.dashboard-mainmenu li a.text-danger {
    color: #ef4444 !important;
}

.dashboard-mainmenu li a.text-danger:hover {
    background-color: #fef2f2;
    border-left-color: #ef4444;
}

/* ========================================
   Badge 樣式
   ======================================== */
.badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    font-weight: 500;
}

/* ========================================
   RWD 響應式設計 - 平板 (768px - 991px)
   ======================================== */
@media (max-width: 991px) {

    /* 背景圖片高度調整 */
    .tutor-bg-photo.height-350 {
        height: 280px;
    }

    /* Tutor Information - 保持 absolute 定位 */
    .rbt-tutor-information {
        padding: 0 20px;
        bottom: 20px;
    }
}

/* ========================================
   RWD 響應式設計 - 手機 (小於 768px)
   ======================================== */
@media (max-width: 767px) {

    /* 背景圖片高度調整 */
    .tutor-bg-photo.height-350 {
        height: 220px;
    }

    /* Tutor Information - 手機版改為相對定位 */
    .rbt-tutor-information {
        position: relative !important;
        bottom: auto !important;
        padding: 1rem;
        width: 100%;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -40px;
        z-index: 2;
    }

    .rbt-tutor-information-left .thumbnail {
        margin-right: 0 !important;
    }

    .rbt-tutor-information-left .tutor-content .title {
        font-size: 1.1rem;
        color: var(--color-heading, #333) !important;
        text-shadow: none;
    }

    /* 頭像尺寸 - 手機版縮小 */
    .rbt-tutor-information-left .thumbnail.rbt-avatars.size-lg {
        width: 80px;
        height: 80px;
        min-width: 80px;
        max-width: 80px;
    }

    /* 會員選單 */
    .dashboard-mainmenu li a {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }

    .dashboard-mainmenu li a i {
        font-size: 1rem;
    }

    /* 側邊欄 */
    .rbt-default-sidebar {
        margin-top: 1rem;
    }

    /* Dashboard 內容區 */
    .rbt-dashboard-content {
        padding: 1rem;
    }

    .rbt-dashboard-content .content {
        padding: 0;
    }
}

/* ========================================
   RWD 響應式設計 - 小手機 (小於 576px)
   ======================================== */
@media (max-width: 575px) {

    /* 背景圖片高度調整 */
    .tutor-bg-photo.height-350 {
        height: 180px;
    }

    /* Tutor Information */
    .rbt-tutor-information-left .tutor-content .title {
        font-size: 1rem;
    }

    /* Badge */
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    /* 頭像尺寸 - 小手機再縮小 */
    .rbt-tutor-information-left .thumbnail.rbt-avatars.size-lg {
        width: 60px;
        height: 60px;
        min-width: 60px;
        max-width: 60px;
    }

    /* 座右銘縮小 */
    .rbt-tutor-information-left .tutor-content h5.title:nth-child(n+2) {
        font-size: 0.85rem;
        opacity: 0.8;
    }
}

/* ========================================
   9:3 佈局（用於信箱表單等）
   ======================================== */
.layout-9-3 {
    display: flex;
    gap: 1rem;
}

.layout-9-3 .layout-input {
    flex: 9;
}

.layout-9-3 .layout-button {
    flex: 3;
    min-width: 120px;
}

@media (max-width: 767px) {
    .layout-9-3 {
        flex-direction: column;
    }

    .layout-9-3 .layout-input,
    .layout-9-3 .layout-button {
        flex: none;
        width: 100%;
    }
}