@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@300;400;500;700&display=swap");

:root {
    --md-text-font: "Montserrat", "IBM Plex Sans KR";
    font-family:
        "Montserrat",
        "IBM Plex Sans KR",
        -apple-system,
        BlinkMacSystemFont,
        system-ui,
        Roboto,
        "Helvetica Neue",
        "Segoe UI",
        "Apple SD Gothic Neo",
        "Noto Sans KR",
        "Malgun Gothic",
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Segoe UI Symbol",
        sans-serif;

    /* https://www.color-hex.com/ */
    --md-primary-fg-color: #005bac;
    --md-primary-fg-color--light: #00afec;
    --md-primary-fg-color--dark: #0d001a;
    --md-primary-bg-color: #ffffff;
    --md-footer-bg-color: #005bac;
    --md-accent-fg-color: #00afec;
}

.md-header__inner {
    padding: 5px 0px 0px 0px;
}

.md-typeset {
    font-size: 16px;
}

.md-header__title {
    margin-left: 0rem;
    margin-right: 0.4rem;
}

.md-typeset h1 {
    margin: -0.2em 0 -0.2em 0;
    font-weight: 700;
    color: var(--md-primary-fg-color);
}

.md-typeset h2 {
    margin: 0.5em 0 -0em 0;
    font-weight: 500;
}

.md-typeset a {
    color: var(--md-primary-fg-color);
    word-break: break-word;
}

.md-typeset mark {
    background-color: var(--md-primary-fg-color);
}

.fg-color-dark {
    color: var(--md-primary-fg-color--dark) !important;
}

/* Course page */
.course-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-top: 0.2em;
    margin-bottom: 2.5em;
}

.course-description {
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 2em;
}

/* Schedule table */
.schedule-table {
    width: 100%;
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: inherit;
}

.lecture-title {
    font-weight: 500;
}

.schedule-table th {
    background-color: var(--md-primary-fg-color);
    color: white !important;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
}

.schedule-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.schedule-table tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.schedule-table tr:hover td {
    background-color: #e8f0fe;
}

/* Class-based cell styles */
td.schedule-date,
th.schedule-date {
    white-space: nowrap;
}

td.schedule-desc {
    vertical-align: top;
}

td.schedule-slides,
th.schedule-slides,
td.schedule-youtube,
th.schedule-youtube {
    white-space: nowrap;
    vertical-align: top;
}

/* Language Toggle Customization */
.md-header__button .lg-txt {
    display: none;
}
.md-select__link .lg-txt {
    display: inline;
}

.custom-lang-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2px 8px !important;
    height: 28px !important;
    width: auto !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.lang-arrow svg {
    color: #ffffff;
    transition: transform 0.2s;
}

[dir="rtl"] .lang-arrow {
    margin-right: 4px;
}

/* Rotate arrow when dropdown is active */
.md-select:hover .lang-arrow svg,
.md-select:focus-within .lang-arrow svg {
    transform: rotate(180deg);
}

/* Adjust select container to fit custom button */
.md-select {
    margin-left: 8px;
}

@media only screen and (max-width: 600px) {
    .schedule-table {
        overflow-x: auto;
    }
}
