/**
 * Стилі для православного календаря
 * Використовує CSS змінні з головного сайту
 */

.orthodox-calendar {
    max-width: 100%;
    margin: 0 auto;
}

.calendar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* Ліва частина - календар */
.calendar-left {
    padding: 2rem;
    background: white;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.calendar-month-year {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a2e;
}

.calendar-nav {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #1a1a2e;
}

.calendar-nav:hover {
    background: var(--accent-color, #8D80FF);
    color: white;
}

/* Дні тижня */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 0.5rem;
}

.weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    padding: 0.5rem 0;
    text-transform: uppercase;
}

/* Сітка днів */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a2e;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover:not(.other-month) {
    background: rgba(141, 128, 255, 0.1);
}

.calendar-day.other-month {
    color: #ccc;
    cursor: default;
}

.calendar-day.today {
    background: var(--accent-color, #8D80FF);
    color: white;
    font-weight: 700;
}

.calendar-day.today:hover {
    background: var(--accent-color, #8D80FF);
    opacity: 0.9;
}

.calendar-day.selected:not(.today) {
    background: rgba(141, 128, 255, 0.2);
    color: var(--accent-color, #8D80FF);
    font-weight: 700;
}

.calendar-day.sunday:not(.other-month) {
    color: #e74c3c;
}

.calendar-day.sunday.today {
    color: white;
}

/* Права частина - інформація про свята */
.calendar-right {
    padding: 2rem;
    background: #1a1a2e;
    color: white;
}

.feast-info {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feast-date-header {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white;
}

.feast-sedmica {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.6;
}

.feast-sedmica strong {
    color: var(--accent-color, #8D80FF);
    display: block;
    margin-bottom: 0.25rem;
}

.fast-info {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Завантаження */
.feast-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color, #8D80FF);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tabs */
.feast-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
}

.feast-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.feast-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

.feast-tab.active {
    background: var(--accent-color, #8D80FF);
    color: white;
}

.feast-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.feast-tab-content::-webkit-scrollbar {
    width: 4px;
}

.feast-tab-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.feast-tab-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.feast-tab-content.active {
    display: block;
}

/* Контент свят */
.feast-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 400px;
}

.feast-text {
    flex: 1;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    padding-right: 0.5rem;
}

.feast-text::-webkit-scrollbar {
    width: 4px;
}

.feast-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.feast-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.feast-text strong {
    color: var(--accent-color, #8D80FF);
}

/* Ікона дня */
.calendar-icon {
    margin-bottom: 1rem;
    text-align: center;
}

.calendar-icon img {
    max-width: 120px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Інформація про піст */
.fasting-info {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.fasting-none { background: #27ae60; color: white; }
.fasting-fish { background: #3498db; color: white; }
.fasting-oil { background: #f39c12; color: white; }
.fasting-strict { background: #9b59b6; color: white; }
.fasting-no_food { background: #e74c3c; color: white; }

/* Список свят */
.feasts-list p {
    margin: 0.35rem 0;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.feasts-list p.great-feast {
    color: var(--accent-color, #8D80FF);
    font-weight: 600;
    border-left-color: var(--accent-color, #8D80FF);
}

.feasts-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    transition: all 0.2s ease;
}

.feasts-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Читання */
.readings-section {
    padding-top: 0;
}

.readings-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--accent-color, #8D80FF);
}

.reading-type {
    margin-bottom: 0.75rem;
}

.reading-type strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: rgba(255, 255, 255, 0.7);
}

.reading-type p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
}

.reading-context {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    font-size: 0.85rem;
}

/* Тропарі */
.troparia-section {
    padding-top: 0;
}

.troparia-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--accent-color, #8D80FF);
}

.troparion-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.troparion-header {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.troparion-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.feast-content {
    text-align: left;
}

/* Посилання */
.feast-link {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blagovist-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color, #8D80FF);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.blagovist-link:hover {
    opacity: 0.8;
}

.blagovist-link svg {
    transition: transform 0.3s ease;
}

.blagovist-link:hover svg {
    transform: translate(2px, -2px);
}

/* Адаптивність */
@media (max-width: 900px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-left {
        padding: 1.5rem;
    }

    .calendar-right {
        padding: 1.5rem;
        min-height: 300px;
    }

    .feast-date-header {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calendar-left,
    .calendar-right {
        padding: 1rem;
    }

    .calendar-month-year {
        font-size: 1.25rem;
    }

    .calendar-nav {
        width: 36px;
        height: 36px;
    }

    .calendar-day {
        font-size: 0.85rem;
    }

    .feast-date-header {
        font-size: 1.25rem;
    }

    .feast-text {
        font-size: 0.85rem;
    }
}
