/**
 * Custom Mobile Calendar Styles
 * Fullscreen modal calendar for mobile devices
 *
 * @since 2.2.0
 */

/* Modal Overlay */
.rhea-mobile-calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rhea-mobile-calendar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Calendar Container */
.rhea-mobile-calendar-container {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.rhea-mobile-calendar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.rhea-mobile-calendar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 10;
}

.rhea-mobile-calendar-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Selected Dates Display */
.rhea-mobile-calendar-selected-dates {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.rhea-date-box {
    flex: 1;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.rhea-date-label {
    display: block;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.rhea-date-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.rhea-date-separator {
    font-size: 18px;
    color: #1a73e8;
    font-weight: bold;
}

/* Calendar Body */
.rhea-mobile-calendar-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Navigation */
.rhea-mobile-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.rhea-calendar-prev,
.rhea-calendar-next {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    font-weight: bold;
    transition: background 0.2s;
}

.rhea-calendar-prev:active,
.rhea-calendar-next:active {
    background: #e0e0e0;
}

.rhea-calendar-month-year {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Calendar Grid */
.rhea-mobile-calendar-grid {
    user-select: none;
}

.rhea-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.rhea-calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 8px 0;
}

.rhea-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

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

.rhea-calendar-day:not(.rhea-calendar-day-disabled):not(.rhea-calendar-day-empty):active {
    transform: scale(0.95);
}

.rhea-calendar-day-empty {
    cursor: default;
}

.rhea-calendar-day-disabled {
    color: #ccc;
    cursor: not-allowed;
}

.rhea-calendar-day-checkin,
.rhea-calendar-day-checkout {
    background: #1a73e8;
    color: #fff;
    font-weight: 600;
}

.rhea-calendar-day-inrange {
    background: #e3f2fd;
    color: #1a73e8;
}

/* Footer */
.rhea-mobile-calendar-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.rhea-calendar-clear,
.rhea-calendar-done {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rhea-calendar-clear {
    background: #f5f5f5;
    color: #666;
}

.rhea-calendar-clear:active {
    background: #e0e0e0;
}

.rhea-calendar-done {
    background: #1a73e8;
    color: #fff;
}

.rhea-calendar-done:active {
    background: #1557b0;
}

/* Mobile Specific (up to 767px) */
@media (max-width: 767px) {
    .rhea-mobile-calendar-container {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        margin: 0;
    }

    .rhea-mobile-calendar-modal {
        align-items: flex-end;
    }

    .rhea-calendar-day {
        font-size: 15px;
    }
}

/* Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .rhea-mobile-calendar-header {
        padding: 15px;
    }

    .rhea-mobile-calendar-title {
        font-size: 18px;
    }

    .rhea-mobile-calendar-body {
        padding: 15px;
    }

    .rhea-date-box {
        padding: 10px 8px;
    }

    .rhea-date-value {
        font-size: 13px;
    }

    .rhea-calendar-day {
        font-size: 14px;
    }
}

/* Desktop - Hide mobile calendar */
@media (min-width: 768px) {
    .rhea-mobile-calendar-modal {
        display: none !important;
    }
}
