/* MoreVision Timetable - Frontend Styles v1.4.0 */

.mvtt-widget { direction: rtl; font-family: 'Heebo', 'Rubik', sans-serif; }

/* Override Elementor overflow */
.elementor-widget-mvtt_timetable,
.elementor-widget-mvtt_timetable > .elementor-widget-container { overflow: visible !important; }

/* ===== Header Area ===== */
.mvtt-header-area { text-align: center; margin-bottom: 28px; }
.mvtt-title { font-size: 36px; font-weight: 900; color: #FD029D; margin: 0 0 4px; line-height: 1.2; }
.mvtt-subtitle { font-size: 16px; color: #FFFFFF; margin: 0; font-weight: 500; }

/* ===== Branch Navigation ===== */
.mvtt-branch-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.mvtt-branch-arrow { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #FD029D; background: rgba(253,2,157,0.1); color: #FD029D; cursor: pointer; transition: all 0.3s ease; flex-shrink: 0; padding: 0; outline: none; }
.mvtt-branch-arrow:hover { background: #FD029D; color: #FFFFFF; transform: scale(1.1); }
.mvtt-branch-title-wrap { position: relative; min-width: 160px; text-align: center; overflow: hidden; height: 36px; display: flex; align-items: center; justify-content: center; }
.mvtt-branch-title { position: absolute; font-size: 20px; font-weight: 800; color: #FFFFFF; white-space: nowrap; opacity: 0; transform: translateY(20px); transition: all 0.35s ease; pointer-events: none; }
.mvtt-branch-title.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mvtt-branch-title.exit-up { opacity: 0; transform: translateY(-20px); }
.mvtt-branch-title.exit-down { opacity: 0; transform: translateY(20px); }
.mvtt-branch-dots { display: flex; gap: 6px; justify-content: center; width: 100%; margin-top: 4px; }
.mvtt-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.25); transition: all 0.3s ease; cursor: pointer; }
.mvtt-dot.active { background: #FD029D; transform: scale(1.3); }
.mvtt-branch-table { display: none; animation: mvtt-fade-in 0.35s ease; }
.mvtt-branch-table.active { display: block; }
@keyframes mvtt-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ===== Table Container ===== */
.mvtt-timetable-wrap { position: relative; overflow: visible; }
.mvtt-table-container {
    overflow-x: auto !important; overflow-y: visible;
    -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
}
.mvtt-table-container::-webkit-scrollbar { height: 4px; }
.mvtt-table-container::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.mvtt-table-container::-webkit-scrollbar-thumb { background: #FD029D; border-radius: 4px; }

/* ===== Table ===== */
.mvtt-timetable { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }

/* ===== Header – BLACK bg, WHITE text ===== */
.mvtt-timetable thead th {
    background: #000000; color: #FFFFFF;
    padding: 14px 8px; font-weight: 800; font-size: 18px;
    text-align: center; white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.08);
}
.mvtt-th-time { min-width: 110px; }

/* ===== EQUAL ROW HEIGHT ===== */
.mvtt-timetable tbody tr {
    height: 70px; /* consistent row height */
}

/* ===== Time Column – PINK bg ===== */
.mvtt-td-time {
    background: #FD029D !important; color: #FFFFFF !important;
    font-weight: 800; font-size: 15px; text-align: center;
    white-space: nowrap; min-width: 110px; padding: 12px 10px;
    letter-spacing: -0.3px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ===== Body Cells ===== */
.mvtt-timetable tbody td {
    padding: 12px 8px; text-align: center; vertical-align: middle;
    border: 1px solid rgba(255,255,255,0.06);
    transition: background-color 0.15s ease;
}

/* Filled = transparent (shows page bg) */
.mvtt-cell-filled { background: transparent; }
.mvtt-timetable tbody tr:hover .mvtt-cell-filled { background: rgba(253,2,157,0.04); }

/* Empty = BLACK solid */
.mvtt-cell-empty { background: #000000; }

/* ===== Cell Content – WHITE TEXT ===== */
.mvtt-cell-content { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.4; }
.mvtt-class-name { font-weight: 700; font-size: 15px; color: #FFFFFF; }
.mvtt-class-info { font-weight: 400; font-size: 12px; color: rgba(255,255,255,0.55); }
.mvtt-instructor {
    display: block;
    font-weight: 500;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid rgba(255,255,255,0.08);
    line-height: 1.3;
}

/* ===== Gap Row (morning → afternoon) ===== */
.mvtt-gap-row { height: 20px !important; }
.mvtt-gap-row td { background: transparent !important; height: 20px; padding: 0 !important; border: none !important; }

/* ===== Empty ===== */
.mvtt-empty-table { text-align: center; padding: 40px !important; color: rgba(255,255,255,0.3); font-size: 16px; }
.mvtt-empty-cell { color: rgba(255,255,255,0.15); font-size: 14px; }

/* ===== Footnote / Link ===== */
.mvtt-footnote { text-align: center; color: rgba(255,255,255,0.5); font-size: 13px; margin-top: 14px; }
.mvtt-full-link { text-align: center; margin-top: 18px; }
.mvtt-link-btn { display: inline-block; padding: 10px 24px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50px; color: #FFFFFF; font-size: 14px; font-weight: 700; transition: all 0.3s ease; text-decoration: none; }
.mvtt-link-btn:hover { border-color: #FD029D; color: #FD029D; }

/* ===== Scroll Indicator ===== */
.mvtt-scroll-indicator { display: none; text-align: center; font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 8px; animation: mvtt-fade-pulse 2s ease infinite; }
@keyframes mvtt-fade-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 0.9; } }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .mvtt-mobile-scroll .mvtt-scroll-indicator { display: block; }
    .mvtt-mobile-scroll .mvtt-timetable { font-size: 12px; min-width: 650px; table-layout: auto; }
    .mvtt-timetable tbody tr { height: 60px; }
    .mvtt-class-name { font-size: 12px; }
    .mvtt-class-info { font-size: 10px; }
    .elementor-widget-mvtt_timetable .e-con,
    .elementor-widget-mvtt_timetable .e-con-inner,
    .elementor-widget-mvtt_timetable .elementor-widget-container,
    .elementor-element:has(.mvtt-widget) { overflow: visible !important; }
    .mvtt-td-time { position: sticky; right: 0; z-index: 3; font-size: 13px; }
    .mvtt-th-time { position: sticky; right: 0; z-index: 4; }
    .mvtt-branch-arrow { width: 34px; height: 34px; }
    .mvtt-branch-title { font-size: 16px; }
}
@media (max-width: 768px) {
    .mvtt-mobile-stack .mvtt-timetable { min-width: unset; }
    .mvtt-mobile-stack .mvtt-timetable tbody tr { height: auto; }
    .mvtt-mobile-stack .mvtt-timetable thead { display: none; }
    .mvtt-mobile-stack .mvtt-timetable tbody tr { display: flex; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .mvtt-mobile-stack .mvtt-timetable tbody td { border: none; padding: 4px 8px; text-align: right; }
    .mvtt-mobile-stack .mvtt-td-time { width: 100%; font-size: 16px; padding-bottom: 8px; border-bottom: 2px solid #FD029D; margin-bottom: 8px; position: static; }
    .mvtt-mobile-stack .mvtt-td-class { width: auto; }
}

/* ===== Legacy ===== */
.mvtt-class-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; margin: 2px 0; white-space: nowrap; background: var(--tag-bg, rgba(253,2,157,0.15)); color: var(--tag-color, #FD029D); }
.mvtt-level-badge { font-size: 11px; font-weight: 700; opacity: 0.8; }
.mvtt-note { display: block; font-size: 10px; color: rgba(255,255,255,0.5); font-style: italic; }
