/**
 * MNC Extender - Timetable Widget Styles
 */

.mnc-timetable-wrapper {
    width: 100%;
    margin: 0 auto;
}

/* Timezone Notice */
.mnc-timezone-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background-color: #DBEAFE;
    border-left: 4px solid #3B82F6;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

.timezone-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.timezone-content h3 {
    font-weight: 600;
    color: #1E3A8A;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.timezone-content p {
    color: #1E40AF;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.6;
}

/* Table Header */
.mnc-timetable-header {
    padding: 1.5rem;
    text-align: center;
    border-radius: 0.75rem 0.75rem 0 0;
}

.mnc-timetable-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 0.5rem 0;
}

.mnc-timetable-subtitle {
    font-size: 1rem;
    color: #C7D2FE;
    margin: 0;
}

/* Table Container */
.mnc-timetable-container {
    overflow-x: auto;
    background: #FFFFFF;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Table */
.mnc-timetable {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
}

.mnc-timetable thead th {
    background-color: #E5E7EB;
    border: 1px solid #D1D5DB;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mnc-timetable thead th.corner-cell {
    width: 100px;
    min-width: 100px;
    position: sticky;
    left: 0;
    z-index: 20;
}

.mnc-timetable tbody th {
    background-color: #F3F4F6;
    border: 1px solid #D1D5DB;
    padding: 0.75rem;
    font-weight: 600;
    color: #4B5563;
    text-align: left;
    font-size: 0.875rem;
    width: 100px;
    min-width: 100px;
    position: sticky;
    left: 0;
    z-index: 5;
    vertical-align: top;
}

.mnc-timetable tbody th .time-main {
    display: block;
    font-weight: 600;
}

.mnc-timetable tbody th .time-original {
    display: block;
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 0.25rem;
    font-weight: 400;
}

.mnc-timetable td {
    border: 1px solid #D1D5DB;
    padding: 0;
    vertical-align: top;
    min-width: 140px;
}

.mnc-timetable td.empty-cell {
    background-color: #FFFFFF;
    height: 80px;
    padding: 0.75rem;
}

.mnc-timetable td.class-cell-container {
    padding: 0;
    background-color: #FFFFFF;
}

.mnc-timetable .class-cell {
    padding: 0.75rem;
    margin-bottom: 2px;
    position: relative;
    border-radius: 4px;
    margin: 2px;
}

.mnc-timetable .class-cell:last-child {
    margin-bottom: 2px;
}

/* Class Content */
.class-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.class-name {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25;
}

.class-instructor {
    font-size: 0.75rem;
    opacity: 0.9;
}

.class-time {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.class-time .time-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.3rem;
    line-height: 1.4;
}

.class-time .time-local-row {
    margin-top: 0.35rem;
}

.class-time .time-row-icon {
    font-size: 0.7rem;
    flex-shrink: 0;
    width: 0.8rem;
    text-align: center;
}

.class-time .time-row-label {
    font-weight: 500;
    opacity: 0.85;
    flex-shrink: 0;
}

.class-time .time-base,
.class-time .time-local {
    font-weight: 600;
    width: 100%;
    padding-left: 1.1rem;
}

.class-info {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mnc-timetable-title {
        font-size: 1.5rem;
    }

    .mnc-timetable-subtitle {
        font-size: 0.875rem;
    }

    .mnc-timetable thead th,
    .mnc-timetable tbody th {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .mnc-timetable td {
        padding: 0.5rem;
        min-width: 120px;
    }

    .class-name {
        font-size: 0.75rem;
    }

    .class-instructor,
    .class-time,
    .class-info {
        font-size: 0.625rem;
    }
}

/* Class link */
.mnc-timetable .class-link {
    margin-top: 16px;
}

.mnc-timetable .class-link a {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}


/* Hover Effect */
.mnc-timetable tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

.mnc-timetable .class-cell:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Print Styles */
@media print {
    .mnc-timezone-notice {
        display: none !important;
    }

    .mnc-timetable-wrapper {
        box-shadow: none;
    }


    .mnc-timetable td.class-cell {
        break-inside: avoid;
    }
}