/* Стили для православного календаря */
.calendar {
    padding: 40px 0;
    font-family: 'Montserrat', sans-serif;
}

.cl_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.cl_filter {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cl_filter select {
    padding: 10px 15px;
    border: 1px solid #dde0e6;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    color: #575e6a;
    cursor: pointer;
    min-width: 150px;
}

.cl_filter select:focus {
    outline: none;
    border-color: #e3c991;
}

.cl_top p {
    margin: 0;
    color: #575e6a;
    font-size: 17px;
}

.cl_datepicker .datepicker--nav {
    display: none;
}

.cl_datepicker .datepicker-inline .datepicker {
    width: 100%;
    border: none;
    box-shadow: none;
    position: static;
    left: auto;
    right: auto;
    opacity: 1;
    transform: none;
}

.cl_datepicker .datepicker--content {
    padding: 0;
}

.cl_datepicker .datepicker--days-names {
    margin: -1px -1px 0;
    padding: 16px 0;
    background-color: #f6f7f9;
    display: flex;
    flex-wrap: wrap;
    margin: 8px 0 3px;
}

.cl_datepicker .datepicker--day-name {
    font-size: 14px;
    color: #24303d;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    text-transform: uppercase;
}

.cl_datepicker .datepicker--day-name.-weekend- {
    color: #FF9A19;
}

.cl_datepicker .datepicker-inline .datepicker {
    border-left: none;
    border-color: #eeecf6;
}

.cl_datepicker .datepicker--cell-day.-other-month- {
    display: block !important;
    color: #dedede;
}

.cl_datepicker .datepicker--cells {
    display: flex;
    flex-wrap: wrap;
}

.cl_datepicker .datepicker--cell {
    display: block;
    height: 98px;
    padding: 0 18px;
    font-size: 3.2rem;
    color: #575e6a;
    border-bottom: 1px solid #eeecf6;
    border-left: 1px solid #eeecf6;
    margin-bottom: -1px;
    border-radius: 0;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    display: flow-root;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 14.28571%;
}

.cl_datepicker .datepicker--cell:last-child {
    border-right: 1px solid #eeecf6;
}

.cl_datepicker .datepicker--cell.-current-,
.cl_datepicker .datepicker--cell.-current-.-selected- {
    background-color: #f6f7f9;
    color: #575e6a;
}

.cl_datepicker .datepicker--cell.-selected- {
    position: relative;
    background-color: transparent;
    color: #575e6a;
}

.cl_datepicker .datepicker--cell.-selected-:after {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    bottom: -1px;
    right: 0;
    border: 1px solid pink;
    z-index: 1;
}

.cl_datepicker .datepicker--cell.-weekend- {
    
}

/* Внутреннее содержимое ячейки */
.cl_current {
    line-height: 1;   
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 3.2rem;
    margin-bottom: 5px;
}

.cl_current.isEvent {
    color: #e3c991;
}

.cl_oldStyle {
    font-size: 14px;
    color: #9da3ad;
    line-height: 1.2;
}

.cl_current,
.cl_labels {
    display: inline-block;
}

.cl_labels span,
.cl_legend span:before {
    display: inline-block;
    width: 25px;
    height: 13px;
    border-radius: 6px;
}

.cl_labels {
    margin-left: 10px;
    font-size: 0;
}

.cl_labels .red,
.cl_legend .red:before {
    background-color: #ffc1c1;
}

.cl_labels .grey,
.cl_legend .grey:before {
    background-color: #c2c0d0;
}

.cl_labels .green,
.cl_legend .green:before {
    background-color: #7fd3b4;
}

.cl_labels span:not(:last-child) {
    margin-right: 5px;
}

/* Легенда */
.cl_legend {
    margin: 30px 0;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.cl_legend span {
    display: inline-block;
    margin: 0 20px;
    font-size: 14px;
    color: #575e6a;
    font-weight: 500;
}

.cl_legend span:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 10px;
    border-radius: 3px;
    margin-right: 10px;
    vertical-align: middle;
}

.cl_legend .green:before {
    background-color: #7fd3b4;
}

.cl_legend .red:before {
    background-color: #ffc1c1;
}

.cl_legend .grey:before {
    background-color: #c2c0d0;
}

/* Информация о дне */
.cl_dayInfo {
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid #e3c991;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.cldi_dayName {
    font-size: 18px;
    color: #575e6a;
    margin-bottom: 10px;
    font-weight: 500;
}

.cldi_month {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 12px;
    color: #202f38;
}

.cldi_oldStyle {
    padding-bottom: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e9e8f1;
    font-size: 14px;
    color: #575e6a;
}

.cldi_text p:not(:last-child) {
    margin-bottom: 18px;
    line-height: 1.6;
    color: #575e6a;
}

/* Адаптивность */
@media screen and (max-width: 768px) {
    .cl_top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cl_filter {
        width: 100%;
        justify-content: space-between;
    }
    
    .cl_filter select {
        flex: 1;
        min-width: 120px;
    }
    
    .cl_datepicker .datepicker--cell {
        height: 80px;
        padding: 0 10px;
    }
    
    .cl_current {
        font-size: 2.4rem;
    }
    
    .cl_oldStyle {
        font-size: 12px;
    }
    
    .cl_labels span {
        width: 20px;
        height: 10px;
    }
    
    .cl_dpWrap {
        padding: 20px;
    }
    
    .cl_dayInfo {
        padding: 20px;
    }
    
    .cldi_month {
        font-size: 2.4rem;
    }
    
    .cl_legend span {
        display: block;
        margin: 8px 0;
        text-align: left;
    }
}

@media screen and (max-width: 480px) {
    .cl_datepicker .datepicker--cell {
        height: 70px;
        padding: 0 5px;
    }
    
    .cl_current {
        font-size: 1.8rem;
    }
    
    .cl_oldStyle {
        font-size: 11px;
    }
    
    .cl_labels span {
        width: 15px;
        height: 8px;
    }
    
    .cl_legend {
        padding: 15px;
    }
    
    .cl_legend span:before {
        width: 15px;
        height: 8px;
    }
    
    .calendar {
        padding: 20px 0;
    }
}

/* Улучшенные стили для выпадающих списков */
.cl_filter select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23575e6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.cl_filter select:focus {
    border-color: #e3c991;
    box-shadow: 0 0 0 3px rgba(227, 201, 145, 0.1);
}

/* Дополнительные стили для нового функционала */
.cl_legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.cl_legend span {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cl_legend .gold { background: #fff9e6; border-left: 3px solid #ffd700; }
.cl_legend .green { background: #f0fff4; border-left: 3px solid #2ecc71; }
.cl_legend .blue { background: #f0f8ff; border-left: 3px solid #3498db; }
.cl_legend .red { background: #ffeaea; border-left: 3px solid #e74c3c; }
.cl_legend .grey { background: #f8f9fa; border-left: 3px solid #95a5a6; }
.cl_legend .purple { background: #f3e8fd; border-left: 3px solid #9b59b6; }

.cldi_additional {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.cldi_section {
    margin-bottom: 20px;
}

.cldi_section h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cldi_items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cldi_item {
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.cldi_item:hover {
    background: #e9ecef;
}

.cldi_feast.cldi_twelve_great { border-left-color: #ffd700; background: #fff9e6; }
.cldi_feast.cldi_great { border-left-color: #2ecc71; background: #f0fff4; }
.cldi_feast.cldi_movable { border-left-color: #3498db; background: #f0f8ff; }
.cldi_fast.cldi_strict { border-left-color: #e74c3c; background: #ffeaea; }
.cldi_fast.cldi_medium { border-left-color: #f39c12; background: #fff4e6; }
.cldi_fast.cldi_light { border-left-color: #f1c40f; background: #fffce6; }
.cldi_saint { border-left-color: #9b59b6; background: #f3e8fd; }
.cldi_icon { border-left-color: #3498db; background: #e3f2fd; }
.cldi_memorial { border-left-color: #7f8c8d; background: #f8f9fa; }

.cldi_icon {
    font-size: 14px;
}

.cldi_name {
    font-weight: 500;
    color: #2c3e50;
}

/* Анимации */
.datepicker--cells-days {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.datepicker--cells-days.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 768px) {
    .cl_legend {
        flex-direction: column;
    }
    
    .cldi_item {
        padding: 8px 12px;
    }
    
    .datepicker--nav {
        padding: 10px;
    }
}

/* Стили для меток в календаре */
.cl_labels {
    gap: 2px;
    margin-top: 5px;
    justify-content: center;
}

.cl_labels span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.label-gold { background: #ffd700; }
.label-green { background: #2ecc71; }
.label-blue { background: #3498db; }
.label-red { background: #e74c3c; }
.label-grey { background: #95a5a6; }
.label-purple { background: #9b59b6; }

/* Стили для выбранной даты */
.datepicker--cell-day.-selected- {
    background: #e3f2fd !important;
}

.datepicker--cell-day.-current- {
    background: #fff8e1 !important;
}