/**
 * Public Calendar CSS
 *
 * Path: assets/css/calendar-public.css
 */

.veezi-calendar-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--veezi-background-color, #000);
    color: var(--veezi-text-color, #fff);
    font-family: var(--veezi-body-font, 'Courier New', monospace);
    padding: 20px;
    border-radius: 4px;
}

/* Header */
.veezi-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
}

.veezi-calendar-month-year {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
    letter-spacing: 2px;
    font-family: var(--veezi-title-font, serif);
}

.veezi-calendar-prev,
.veezi-calendar-next {
    background-color: transparent;
    border: 2px solid var(--veezi-text-color, #fff);
    color: var(--veezi-text-color, #fff);
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.veezi-calendar-prev:hover,
.veezi-calendar-next:hover {
    background-color: var(--veezi-text-color, #fff);
    color: var(--veezi-background-color, #000);
}

.veezi-calendar-prev.disabled,
.veezi-calendar-next.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.veezi-calendar-prev.disabled:hover,
.veezi-calendar-next.disabled:hover {
    background-color: transparent;
    color: var(--veezi-text-color, #fff);
}

.veezi-arrow-left::before {
    content: '←';
}

.veezi-arrow-right::before {
    content: '→';
}

/* Calendar Grid */
.veezi-calendar-grid {
    border: 1px solid #333;
}

.veezi-calendar-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
}

.veezi-day-name {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
    border-right: 1px solid #333;
}

.veezi-day-name:last-child {
    border-right: none;
}

/* Show full day names by default, hide mobile version */
.veezi-day-name-full {
    display: inline;
}

.veezi-day-name-mobile {
    display: none;
}

.veezi-calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-height: 600px;
    grid-auto-rows: 1fr;
}

/* Date Cells */
.veezi-calendar-date {
    min-height: 120px;
    padding: 8px;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    background-color: #000;
    position: relative;
    display: flex;
    flex-direction: column;
}

.veezi-calendar-date:nth-child(7n) {
    border-right: none;
}

.veezi-calendar-date-empty {
    background-color: #0a0a0a;
}

.veezi-day-number {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #999;
}

.veezi-has-showtimes {
    background-color: #1a0000;
}

.veezi-has-showtimes .veezi-day-number {
    color: #fff;
}

/* Movie Titles */
.veezi-calendar-movie-title {
    background-color: var(--veezi-primary-color, #8B0000);
    color: var(--veezi-text-color, #fff);
    padding: 6px 8px;
    margin-bottom: 4px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    min-width: 0;
}

.veezi-calendar-movie-title:hover {
    background-color: var(--veezi-primary-color, #a00000);
    filter: brightness(1.2);
    transform: translateX(2px);
}

.veezi-calendar-movie-title.veezi-sold-out {
    opacity: 0.6;
    text-decoration: line-through;
}

.veezi-calendar-movie-title.veezi-few-left {
    background-color: #b8860b;
}

.veezi-calendar-movie-title.veezi-few-left:hover {
    background-color: #daa520;
}

.veezi-calendar-more {
    font-size: 11px;
    color: #888;
    font-style: italic;
    margin-top: 4px;
}

/* Popup */
.veezi-calendar-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.veezi-calendar-popup-content {
    background-color: var(--veezi-background-color, #1a1a1a);
    border: 2px solid var(--veezi-primary-color, #8B0000);
    max-width: 600px;
    width: 100%;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 10px 40px var(--veezi-primary-color, rgba(139, 0, 0, 0.3));
}

.veezi-calendar-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    border: none;
    color: var(--veezi-text-color, #fff);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: color 0.2s ease;
}

.veezi-calendar-popup-close:hover {
    color: var(--veezi-primary-color, #8B0000);
}

.veezi-calendar-popup-inner {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.veezi-calendar-popup-poster {
    flex: 0 0 200px;
}

.veezi-calendar-popup-poster img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 3px solid var(--veezi-secondary-color, #FFD700);
    box-shadow: 0 0 20px var(--veezi-secondary-color, rgba(255, 215, 0, 0.3));
}

.veezi-calendar-popup-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.veezi-calendar-popup-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: var(--veezi-text-color, #fff);
    font-family: var(--veezi-title-font, serif);
}

.veezi-calendar-popup-date {
    font-size: 14px;
    margin-bottom: 15px;
    color: #ccc;
}

.veezi-showtimes-label {
    font-size: 14px;
    margin-bottom: 10px;
    color: #999;
}

.veezi-showtimes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.veezi-showtime-button {
    background-color: var(--veezi-primary-color, #8B0000);
    color: var(--veezi-text-color, #fff);
    border: 1px solid var(--veezi-primary-color, #8B0000);
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: var(--veezi-body-font, 'Courier New', monospace);
    position: relative;
    text-decoration: none;
    display: inline-block;
}

.veezi-showtime-button:hover {
    background-color: var(--veezi-primary-color, #a00000);
    filter: brightness(1.2);
    border-color: var(--veezi-primary-color, #a00000);
}

.veezi-showtime-button.veezi-sold-out {
    background-color: #333;
    border-color: #333;
    color: #666;
    cursor: not-allowed;
    text-decoration: line-through;
}

.veezi-showtime-button.veezi-few-left {
    background-color: #b8860b;
    border-color: #b8860b;
}

.veezi-showtime-button.veezi-few-left:hover {
    background-color: #daa520;
    border-color: #daa520;
}

.veezi-status-text {
    display: block;
    font-size: 10px;
    margin-top: 2px;
}

.veezi-calendar-popup-button {
    background-color: var(--veezi-primary-color, #8B0000);
    color: var(--veezi-text-color, #fff);
    border: 2px solid var(--veezi-primary-color, #8B0000);
    padding: 12px 24px;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: auto;
    font-family: var(--veezi-body-font, 'Courier New', monospace);
}

.veezi-calendar-popup-button:hover {
    background-color: var(--veezi-primary-color, #a00000);
    filter: brightness(1.2);
    border-color: var(--veezi-primary-color, #a00000);
    color: var(--veezi-text-color, #fff);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--veezi-primary-color, rgba(139, 0, 0, 0.3));
}

/* Popup Navigation */
.veezi-calendar-popup-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.veezi-calendar-popup-prev,
.veezi-calendar-popup-next {
    background-color: transparent;
    border: none;
    color: var(--veezi-text-color, #fff);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    font-family: var(--veezi-body-font, 'Courier New', monospace);
    transition: all 0.2s ease;
}

.veezi-calendar-popup-prev:hover,
.veezi-calendar-popup-next:hover {
    color: var(--veezi-primary-color, #8B0000);
}

.veezi-calendar-popup-prev {
    text-align: left;
}

.veezi-calendar-popup-next {
    text-align: right;
    margin-left: auto;
}

/* Mobile indicator for dates with movies */
.veezi-calendar-mobile-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background-color: var(--veezi-primary-color, #8B0000);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.veezi-calendar-mobile-indicator:hover {
    background-color: var(--veezi-primary-color, #a00000);
    filter: brightness(1.2);
    transform: translateX(-50%) scale(1.1);
}

.veezi-calendar-mobile-indicator.veezi-sold-out {
    opacity: 0.6;
}

.veezi-calendar-mobile-indicator.veezi-few-left {
    background-color: #b8860b;
}

.veezi-calendar-mobile-indicator.veezi-few-left:hover {
    background-color: #daa520;
}

/* Responsive */
@media screen and (max-width: 768px) {
    /* Switch to single letter day names on mobile */
    .veezi-day-name-full {
        display: none;
    }

    .veezi-day-name-mobile {
        display: inline;
    }

    .veezi-calendar-month-year {
        font-size: 24px;
    }

    .veezi-calendar-date {
        min-height: 80px;
        padding: 4px;
        position: relative;
    }

    .veezi-day-number {
        font-size: 14px;
    }

    /* Hide movie titles on mobile */
    .veezi-calendar-movie-title,
    .veezi-calendar-more {
        display: none;
    }

    /* Show mobile indicator instead */
    .veezi-calendar-mobile-indicator {
        display: flex;
    }

    .veezi-calendar-popup-inner {
        flex-direction: column;
    }

    .veezi-calendar-popup-poster {
        flex: 0 0 auto;
        max-width: 200px;
        margin: 0 auto;
    }

    .veezi-calendar-popup-title {
        font-size: 20px;
    }

    .veezi-showtime-button {
        font-size: 12px;
        padding: 6px 12px;
    }
}
