/**
 * استایل‌های ویجت زمان‌بندی کلاس‌ها برای افزونه مدیریت دانشگاه
 */

.calendar-container {
    background: white;
    border-radius: 10px;
    padding: 15px;
    max-width: 100%;
    margin: 20px auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.today-text {
    text-align: center;
    font-size: 16px;
    margin-bottom: 10px;
    cursor: pointer;
    color: #1f1f1f;
    font-weight: 500;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background-image: url('../images/class-timer-header-bg.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 15px;
    border-radius: 16px;
    position: relative;
}

.calendar-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.week-days {
    display: flex;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    width: 100%;
}

.day {
    width: 100%;
    background: transparent;
    padding: 10px;
    color: #fff;
    text-align: center;
    font-size: 14px;
    position: relative;
    line-height: 1.2;
    cursor: pointer;
    border-radius: 16px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.day.today {
    font-weight: bold;
}

.day.active {
    background: #ffffff !important;
    color: #181818 !important;
    font-weight: bold;
    border-radius: 16px;
}

#classList {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 200px;
}

.no-result {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.class-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.class-card:hover {
    border: 1px solid #999999;
    box-shadow: 0 2px 5px rgba(187, 187, 187, 0.15);
}

.class-card img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.class-info {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.name-info-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.info-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 25px;
}

.class-info h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.class-info p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

#nextWeek, #prevWeek {
    background-color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    margin: 0px 20px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#nextWeek svg, #prevWeek svg {
    margin-top: 2px;
}

#nextWeek:hover, #prevWeek:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.class-card .start-btn button {
    background-color: #212179;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.class-card .start-btn button:hover {
    background-color: #212179f1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

/* وضعیت‌ها */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 25px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}
.status-pill .icon { display: inline-flex; }
.status-pill.finished { background-color: #28a745; }
.status-pill.canceled { background-color: #dc3545; }
.status-pill.postponed { background-color: #ff9800; }

.class-info p {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    font-weight: 300;
}

.calendar-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.timer-wrapper {
    direction: ltr;
}

.digit-box {
    border: 1px solid #eaeaea;
    padding: 3px 6px;
    border-radius: 4px;
    margin: 0 1px;
    display: inline-block;
    font-size: 16px;
    color: #333;
    background-color: #f4f4f4;
}

/* Load more UI */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 10px 0 0;
}
.load-more-btn {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    color: #222;
    padding: 10px 16px;
    border-radius: 24px;
    cursor: pointer;
    transition: all .25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.load-more-btn:hover { box-shadow: 0 2px 6px rgba(0,0,0,.08); transform: translateY(-1px); }
.load-more-btn.loading { opacity: .8; cursor: default; }
.load-more-btn .spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid #999; border-top-color: transparent;
    display: inline-block; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Animation and hidden state for cards */
.is-hidden { display: none; }
.fade-in-up { animation: fadeInUp .45s ease both; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive */
@media (max-width: 600px) {
    .week-days {
        display: flex;
        gap: 10px;
        width: 100%;
        flex-wrap: nowrap;
        flex-direction: row;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .calendar-header {
        padding: 10px 10% !important;
    }

    .week-days::-webkit-scrollbar {
        width: 0px !important;
    }

    .day {
        width: calc(100% / 2 - 30px);
        padding: 7px 12px;
        font-size: 14px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0 !important;
    }

    .day.active {
        background: #ffffff !important;
        color: #181818 !important;
        font-weight: normal;
        border-radius: 16px;
    }

    .calendar-header {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .calendar-header button {
        margin-bottom: 10px;
    }

    .class-card {
        flex-direction: column;
        align-items: center;
    }

    .class-card img {
        width: 100px;
        height: 130px;
    }

    .class-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .class-info {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
    }

    .class-card img {
        width: 80px;
        height: 100px;
    }

    .calendar-details {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        gap: 5px;
    }

    #nextWeek, #prevWeek {
        top: 50%;
        position: absolute;
        margin: 0px;
        padding: 6px 8px;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #nextWeek svg, #prevWeek svg {
        margin-top: 1px;
    }

    #nextWeek {
        left: 2%;
    }

    #prevWeek {
        right: 2%;
    }
} 