/**
 * Custom Calendar Component Styles
 * 
 * Styling for the custom calendar component.
 * Designed to match the existing calculator styles.
 * 
 * @package Essentials_Child
 * @version 1.0.0
 */

/* Calendar Input Styling */
.custom-calendar-container {
    position: relative;
}

.calendar-input-wrapper {
    position: relative;
    width: 100%;
}

.custom-calendar-input {
    cursor: pointer;
    padding-right: 35px !important;
}

.calendar-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #28ebcf;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.calendar-icon:hover {
    opacity: 1;
}

/* Calendar Dropdown Styling */
.custom-calendar-dropdown {
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(145deg, #2a2a2a, #0e0e0e);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    display: none;
    margin-top: 85px;
    left: 0;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.current-view-title {
    color: #28ebcf;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    flex-grow: 1;
}

.calendar-nav-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    outline: none;
}

.calendar-nav-btn:hover {
    background-color: rgba(40, 235, 207, 0.2);
}

.calendar-nav-btn:focus,
.calendar-nav-btn:active {
    outline: none;
    box-shadow: none;
}

/* Calendar Weekdays */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-weekdays div {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
    padding: 5px 0;
}

/* Calendar Days */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 15px;
}

.calendar-day {
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e0e0e0;
}

.calendar-day:hover:not(.empty):not(.disabled) {
    background-color: rgba(40, 235, 207, 0.2);
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.today {
    border: 1px solid #28ebcf;
    font-weight: 600;
}

.calendar-day.selected {
    background-color: #28ebcf;
    color: #0e0e0e;
    font-weight: 600;
}

.calendar-day.disabled {
    color: #555;
    cursor: not-allowed;
}

/* Calendar View Switch */
.calendar-view-switch {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    gap: 5px;
}

.view-switch-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.view-switch-btn:hover {
    background-color: rgba(40, 235, 207, 0.1);
    color: #fff;
}

.view-switch-btn.active {
    background-color: rgba(40, 235, 207, 0.2);
    color: #28ebcf;
    font-weight: 600;
}

/* Calendar View Container */
.calendar-view-container {
    position: relative;
    min-height: 220px;
}

.calendar-view {
    display: none;
}

.calendar-view.active {
    display: block;
}

/* Month View */
.calendar-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.calendar-month {
    text-align: center;
    padding: 10px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e0e0e0;
}

.calendar-month:hover:not(.disabled) {
    background-color: rgba(40, 235, 207, 0.2);
}

.calendar-month.selected {
    background-color: #28ebcf;
    color: #0e0e0e;
    font-weight: 600;
}

.calendar-month.current {
    border: 1px solid #28ebcf;
}

/* Year View */
.calendar-years {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calendar-year {
    text-align: center;
    padding: 8px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e0e0e0;
    font-size: 14px;
}

.calendar-year:hover:not(.disabled) {
    background-color: rgba(40, 235, 207, 0.2);
}

.calendar-year.selected {
    background-color: #28ebcf;
    color: #0e0e0e;
    font-weight: 600;
}

.calendar-year.current {
    border: 1px solid #28ebcf;
}

/* Decade View */
.calendar-decades {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calendar-decade {
    text-align: center;
    padding: 8px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e0e0e0;
    font-size: 13px;
}

.calendar-decade:hover:not(.disabled) {
    background-color: rgba(40, 235, 207, 0.2);
}

.calendar-decade.selected {
    background-color: #28ebcf;
    color: #0e0e0e;
    font-weight: 600;
}

.calendar-decade.current {
    border: 1px solid #28ebcf;
}

.calendar-decade.disabled,
.calendar-year.disabled,
.calendar-month.disabled {
    color: #555;
    cursor: not-allowed;
}

/* Calendar Footer */
.calendar-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-today-btn,
.calendar-close-btn {
    background: none;
    border: none;
    color: #28ebcf;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.calendar-today-btn:hover,
.calendar-close-btn:hover {
    background-color: rgba(40, 235, 207, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .custom-calendar-dropdown {
        width: 100%;
        left: 0;
        right: 0;
    }

    .calendar-day {
        padding: 6px 0;
        font-size: 13px;
    }
}