/* Base grid/card styles in common.css; retain color, tables, responsive tweaks */

/* ===== Color-coded Cards ===== */
.days {
    border-top-color: #ff8c00;
    /* orange */
}

.months {
    border-top-color: #20b2aa;
    /* teal */
}

.time {
    border-top-color: #ff4757;
    /* red */
}

/* ===== Calendar Tables ===== */
.calendar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 15px 0;
    font-size: 0.95rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.calendar-table.days th {
    background: #ff8c00;
    color: white;
}

.calendar-table.months th {
    background: #20b2aa;
    color: white;
}

.calendar-table.time th {
    background: #ff4757;
    color: white;
}

.calendar-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.calendar-table tr:nth-child(even) td {
    background: #f7f5fc;
}

.calendar-table tr:hover td {
    background: #f0f8ff;
}

/* Modal border overrides */
.modal-content.days { border-top-color:#ff8c00; }
.modal-content.months { border-top-color:#20b2aa; }

.modal-content.calendar-days-modal h2 {
    color: #ff8c00;
}

.calendar-days-modal {
    border-top-color: #ff8c00;
}

.modal-content.calendar-months-modal h2 {
    color: #20b2aa;
}

.calendar-months-modal {
    border-top-color: #20b2aa;
}

.modal-content.calendar-time-modal h2 {
    color: #ff4757;
}

.modal-content.calendar-time-modal h3 {
    color: #ff4757;
    font-style: italic;
}

.calendar-time-modal {
    border-top-color: #ff4757;
}

/* ===== Time Tables (Specific Styling) ===== */

/* Base for all time tables */
.calendar-table.time-basic,
.calendar-table.time-grammar,
.calendar-table.time-sentences {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 18px 0;
    font-size: 0.95rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Headers */
.calendar-table.time-basic th,
.calendar-table.time-grammar th,
.calendar-table.time-sentences th {
    background: #ff4757;
    color: white;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Table cells */
.calendar-table.time-basic td,
.calendar-table.time-grammar td,
.calendar-table.time-sentences td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

/* Alternate rows */
.calendar-table.time-basic tr:nth-child(even) td,
.calendar-table.time-grammar tr:nth-child(even) td,
.calendar-table.time-sentences tr:nth-child(even) td {
    background: #fff7f8;
}

/* Hover effects */
.calendar-table.time-basic tr:hover td,
.calendar-table.time-grammar tr:hover td,
.calendar-table.time-sentences tr:hover td {
    background: #ffeef0;
    transition: background 0.2s ease;
}

/* Gradient headers for variety */
.calendar-table.time-grammar th {
    background: #ff4757;
}

.calendar-table.time-sentences th {
    background: #ff4757;
}

/* ===== Modal Text and Typography ===== */
.calendar-time-modal h2 {
    color: #ff4757;
    margin-bottom: 10px;
}

.calendar-time-modal h3 {
    color: #ff4757;
    font-style: italic;
    margin-top: 25px;
    margin-bottom: 8px;
}

.calendar-time-modal p {
    color: #444;
    line-height: 1.6;
    margin-bottom: 12px;
}

.calendar-time-modal strong {
    color: #ff4757;
}

.calendar-time-modal em {
    font-style: italic;
    color: #555;
}

.calendar-time-modal p a {
    color: #ff4757;
    text-decoration: none;
}

.calendar-time-modal p a:hover {
    text-decoration: underline;
}

/* ===== Optional: Case Column Highlight ===== */
.calendar-table.time-grammar td:nth-child(4),
.calendar-table.time-sentences td:nth-child(4) {
    font-style: italic;
    color: #ff4757;
    background-color: #fff1f3;
}

/* ===== Small Screen Adjustments ===== */
@media (max-width: 600px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-card {
        padding: 20px;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 10px;
        font-size: 0.9rem;
    }

    .calendar-time-modal h2 {
        font-size: 1.3rem;
    }
}