:root {
    --border-color: #777777;
    --text-color: #333333;
    --violet-50: #f5f3ff;
    --violet-100: #ede9fe;
    --violet-200: #ddd6fe;
    --violet-300: #c4b5fd;
    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --violet-700: #6d28d9;
    --violet-800: #5b21b6;
    --violet-900: #4c1d95;
}

@font-face {
    font-family: "VazirMatn"; /* Name you’ll use in CSS */
    src: url("../fonts/vazirmatn-variable.woff2") format("woff2-variations");
    font-weight: 100 900; /* Define the weight range */
    font-style: normal; /* or normal/italic */
    font-display: swap; /* Improve perceived load time */
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: VazirMatn, system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.5;
}

img {
    display: block;
}

html,
body {
    min-height: 100dvh;
    line-height: 1.5;
}

body {
    color: var(--text-color);
    padding: 1rem;
}

main {
    max-width: 30rem;
    width: 100%;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 0.75rem;
}

input {
    background-color: transparent;
    border: 1px solid var(--border-color);
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    height: 48px;
    outline: 1px solid transparent;
    transition:
        border 150ms ease-in-out,
        outline 150ms ease-in-out;
}

input:focus {
    border: 1px solid var(--violet-600);
    outline: 2px solid #8338ec44;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 14px;
}

select {
    background-color: transparent;
    border: 1px solid var(--border-color);
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    height: 48px;
}

option {
    background-color: var(--violet-50);
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.mb-1 {
    margin-bottom: 1.25rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-field {
    background-color: #e8e8e8;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid #e8e8e8;
    padding: 0.5rem;
    height: 48px;
    display: flex;
    align-items: center;
}

img.student-photo {
    display: block;
    min-width: 200px;
    min-height: 200px;
    border-radius: 0.25rem;
}

a.active {
    background-color: var(--violet-200);
}

.class-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.class-card {
    border: 1px solid #e8e8e8;
    width: 100%;
    padding: 1.25rem;
    border-radius: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.class-card .anchor {
    color: var(--text-color);
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.bold {
    font-weight: bold;
}

.purchase-history {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}


.purchase-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

.purchase-card:last-child {
    border-bottom: none;
}

.purchase-item {
    display: flex;
    gap: 1.25rem;
    font-size: 14px;
    justify-content: space-between;
}

.purchase-item > a {
    text-decoration: none;
    color: var(--text-color);
}

.purchase-item > a:hover {
    text-decoration: underline;
}


.link {
    margin-top: 1rem;
    display: inline-block;
    color: var(--text-color);
}

.navbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.navbar h1 {
    font-size: 1.5rem;
    flex-grow: 1;
    font-weight: bold;
    margin-bottom: 0;
}

.navbar a {
    font-size: 1.25rem;
    color: var(--text-color);
    text-underline-offset: 0.5rem;
    color: #212121;
    padding: 0.25rem;
    border-radius: 0.25rem;
    display: block;
    text-decoration: none;
}

.student-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.student-list > a:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.student-list > a {
    color: var(--text-color);
    padding: 0.25rem;
    text-decoration: none;
}

.student-list > a:hover{
    text-decoration: underline;
}

.button {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem;
    width: 100%;
    background-color: #e8e8e8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color);
    text-decoration: none;
    height: 48px;
    background-color: var(--violet-600);
    border-color: var(--violet-600);
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition:
        background-color 150ms ease-in-out,
        color 150ms ease-in-out;
}

.button:hover {
    background-color: #ffffff;
    color: var(--violet-600);
}

.calendar-main {
    max-width: 100rem;
}

.calendar-container {
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    overflow: auto;
}

.calendar {
    min-width: max-content;
    font-size: 14px;
}

.calendar > :not(:last-child) {
    border-bottom: 1px solid #212121;
}

.calendar-row {
    display: flex;
}

.calendar-row > div {
    border-left: 1px solid #212121;
}

.calendar-day {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-basis: 80px;
    flex-shrink: 0;
    background-color: var(--violet-50);
}

.calendar-date {
    font-size: 11px;
}

.calendar-time-block {
    flex-basis: 160px;
    flex-shrink: 0;
}

.calendar-time-block .time-block {
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #212121;
    background-color: var(--violet-500);
    color: #ffffff;
}

.calendar-class-full {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem;
    text-align: center;
    color: #b71c1c;
}

.calendar-class-full:hover {
    background-color: var(--violet-50);
}

.calendar-class-enroll {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem;
    text-align: center;
    color: #388e3c;
}

.calendar-class-enroll:hover {
    background-color: var(--violet-50);
}

.error {
    border-radius: 0.25rem;
    width: 100%;
    padding: 0.25rem;
    background-color: #ffebee;
    color: #b71c1c;
    margin-bottom: 1rem;
}

.success {
    border-radius: 0.25rem;
    width: 100%;
    padding: 0.25rem;
    background-color: #e8f5e9;
    color: #388e3c;
    margin-bottom: 1rem;
}

.menu-btn {
    background-color: transparent;
    border: none;
    width: fit-content;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.5rem;
    transition: background-color 150ms ease-in-out;
}

.menu-btn:hover {
    background-color: var(--violet-100);
}

.menu-container {
    align-items: center;
}

.menu {
    display: flex;
    position: fixed;
    z-index: 10;
    background-color: white;
    inset: 0;
    padding: 1rem;
    justify-content: center;
    opacity: 0;
    transform: translateX(-100%);
    transition:
        opacity 150ms ease-in-out,
        transform 150ms ease-in-out;
}

.menu-container:focus-within .menu {
    opacity: 1;
    transform: translateX(0);
}

.menu a {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    transition: background-color 150ms ease-in-out;
}

.menu a:hover:not(.active) {
    background-color: var(--violet-100);
}

.menu > div {
    padding: 1rem;
}

*::selection {
    background-color: var(--violet-700);
    color: white;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        #ff006eaa,
        #3a86ffaa,
        #8338ecaa,
        #ffbe0baa,
        #06d6a0aa,
        #ff006eaa
    );
    background-size: 400% 400%;
    animation: gradientAnimation 30s ease infinite;
    z-index: -2;
}

.anchor {
    text-decoration: none;
}

.anchor:hover {
    text-decoration: underline;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.tips {
    border: 1px solid var(--border-color);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-radius: 0.5rem;
    padding: 1rem 0.5rem;
    margin-bottom: 2rem;
}

.calendar-filter {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.calendar-filter > .input-field {
    width: 100%;
}

.profile-navbar {
    display: flex;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.profile-navbar a {
    flex-grow: 1;
    flex-basis: 0;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 14px;
}

@media (min-width: 1024px) {
    body {
        padding: 2rem;
    }

    main {
        padding: 2rem;
    }

    .menu {
        padding: 2rem;
    }

    .menu > div {
        padding: 2rem;
    }

    .calendar-filter {
        flex-direction: row;
    }

    .calendar-filter > button {
        width: 10rem;
    }

    .calendar-filter > .input-field {
        width: auto;
    }
}
