/* 🌟 APPLE LIQUID GLASS CALENDAR STYLES - FROM CALENDAR.PHP */

/* FullCalendar Column Headers */
.fc-col-header-cell {
    background: #2c3e50 !important;
    color: white !important;
    font-weight: 700 !important;
}

.fc-col-header-cell-cushion {
    color: white !important;
    font-weight: 700 !important;
}

/* Multi-day Event Styles */
.fc-event.fc-event-start:not(.fc-event-end) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-right: 0 !important;
}

.fc-event.fc-event-end:not(.fc-event-start) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin-left: 0 !important;
}

.fc-event:not(.fc-event-start):not(.fc-event-end) {
    border-radius: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Pokemon Image in Calendar */
.pokemon-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin: 2px;
    border: 2px solid rgba(255,255,255,0.8);
}

/* Ended Event Styles */
.fc-event.ended-event {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    opacity: 0.6;
}

.fc-event.ended-event .pokemon-image {
    filter: grayscale(100%) opacity(0.6);
}

.fc-event.ended-event .event-name {
    opacity: 0.8;
}

.fc-event.ended-event .pokemon-featured-name {
    opacity: 0.6;
}

/* Multi-day Event Indicator */
.multi-day-indicator {
    font-size: 0.7em;
    opacity: 0.8;
    margin-top: 1px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

/* Multi-day Event Styles */
.fc-event.fc-event-start:not(.fc-event-end) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-right: 0 !important;
}

.fc-event.fc-event-end:not(.fc-event-start) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin-left: 0 !important;
}

.fc-event:not(.fc-event-start):not(.fc-event-end) {
    border-radius: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Apple Liquid Glass Calendar Container */
#calendar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

#calendar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-radius: 20px;
    pointer-events: none;
    z-index: 0;
}

#calendar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 100%
    );
    border-radius: 20px 20px 0 0;
    pointer-events: none;
    z-index: 0;
}

/* Make sure calendar content is above the glass effects */
#calendar .fc {
    position: relative;
    z-index: 1;
}

/* Style the calendar header with glass effect */
.fc-header-toolbar {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
}

/* Style calendar buttons with glass effect */
.fc-button {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #1d1d1f !important;
    border-radius: 8px !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.fc-button:hover, .fc-button:focus {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 100%
    ) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.fc-button-active, .fc-button-active:hover {
    background: linear-gradient(
        135deg,
        rgba(0, 122, 255, 0.8) 0%,
        rgba(0, 100, 210, 0.8) 100%
    ) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 4px 12px rgba(0, 122, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Style the calendar title */
.fc-toolbar-title {
    color: #1d1d1f !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

/* Style the day headers */
.fc-col-header {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 100%
    ) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.fc-col-header-cell {
    background: transparent !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.fc-col-header-cell-cushion {
    color: #1d1d1f !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

/* Style the calendar body */
.fc-daygrid-body {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

.fc-daygrid-day {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease !important;
}

.fc-daygrid-day:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.fc-daygrid-day-number {
    color: #1d1d1f !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

.fc-day-today {
    background: linear-gradient(
        135deg,
        rgba(0, 122, 255, 0.15) 0%,
        rgba(0, 100, 210, 0.15) 100%
    ) !important;
    border: 1px solid rgba(0, 122, 255, 0.3) !important;
}

.fc-day-today .fc-daygrid-day-number {
    color: #007aff !important;
    font-weight: 700 !important;
}

/* Style list view for mobile */
.fc-list {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    border-radius: 12px !important;
}

.fc-list-event {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transition: all 0.2s ease !important;
}

.fc-list-event:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.fc-list-event-title {
    color: #1d1d1f !important;
    font-weight: 600 !important;
}

.fc-list-event-time {
    color: #86868b !important;
    font-weight: 500 !important;
}

/* Enhanced Apple Liquid Glass Modal */
.modal-content {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-radius: 20px;
    pointer-events: none;
}

.modal-backdrop {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.3) !important;
}

.modal-header {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0;
    padding: 20px 24px;
}

.modal-title {
    font-weight: 700;
    color: #1d1d1f;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
    background: transparent;
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: linear-gradient(
        135deg,
        rgba(108, 117, 125, 0.15) 0%,
        rgba(108, 117, 125, 0.08) 100%
    ) !important;
    border: 1px solid rgba(108, 117, 125, 0.2) !important;
    color: #6c757d !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
}

.btn-secondary:hover {
    background: linear-gradient(
        135deg,
        rgba(108, 117, 125, 0.2) 0%,
        rgba(108, 117, 125, 0.12) 100%
    ) !important;
    border-color: rgba(108, 117, 125, 0.3) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.2);
}

/* Apple Liquid Glass Events */
.fc-event {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.fc-event::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}

.fc-event:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.fc-event-title, .fc-event-time {
    position: relative !important;
    z-index: 2 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    font-weight: 600 !important;
}

.fc-event-main {
    position: relative !important;
    z-index: 2 !important;
}

.fc-event-title-container {
    position: relative !important;
    z-index: 2 !important;
}

.fc-event::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 100%
    );
    border-radius: 8px 8px 0 0;
    pointer-events: none;
    z-index: 1;
}

/* Pokemon image in events with glass effect */
.pokemon-image {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 8px !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    opacity: 0.9 !important;
}

.pokemon-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-radius: 6px;
    pointer-events: none;
    z-index: 1;
}

.pokemon-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 100%
    );
    border-radius: 8px 8px 0 0;
    pointer-events: none;
    z-index: 1;
}

.pokemon-image:hover {
    transform: scale(1.05) translateY(-2px) !important;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    opacity: 1 !important;
}

/* Event content layout styling */
.event-content {
    display: flex;
    align-items: flex-start;
    width: 100%;
    line-height: 1.2;
    gap: 8px;
}

.event-image-column {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.event-text-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    margin: auto;
}

.event-name {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    margin-bottom: 2px;
    margin: auto;
}

.pokemon-featured-name {
    font-size: 0.8em !important;
    opacity: 0.9 !important;
    margin-top: 2px !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    padding-left: 2px;
}

/* Adjust pokemon image size in events for better layout */
.fc-event .pokemon-image {
    width: 64px !important;
    height: 64px !important;
    margin: 0 !important;
    flex-shrink: 0;
}

/* Event modal image - correct class for modal images */
.event-modal-image {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 16px;
}

.event-modal-image:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .pokemon-featured-name {
        font-size: 0.75em !important;
    }
    
    .fc-event .pokemon-image {
        width: 38px !important;
        height: 38px !important;
    }
    
    .event-modal-image {
        width: 120px;
        height: 120px;
    }
    
    .modal-dialog {
        margin: 1rem !important;
    }
}

/* 🔥 STRONGER MOBILE LAYOUT - FORCE NEW LINE FOR VIEW BUTTONS */
@media (max-width: 767px) {
    /* Remove all padding/margin from containers for full width calendar */
    body {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .container,
    .container-fluid,
    main,
    .main-content,
    .content-wrapper {
        padding: 0 8px !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Make calendar full width but keep rounded corners */
    #calendar {
        margin: 0 !important;
        border-radius: 16px !important;
        border-left: none !important;
        border-right: none !important;
    }

    /* Main toolbar - flex column layout */
    .fc-toolbar {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0 !important;
        padding: 20px 15px !important;
        width: 100% !important;
    }
    
    /* Force clear separation of toolbar sections */
    .fc-toolbar-chunk {
        display: block !important;
        clear: both !important;
    }
    
    /* Title section */
    .fc-toolbar-chunk:nth-child(1) {
        order: 1 !important;
        text-align: center !important;
        margin-bottom: 15px !important;
    }
    
    .fc-toolbar-title {
        font-size: 20px !important;
        margin: 0 !important;
    }
    
    /* Navigation buttons section */
    .fc-toolbar-chunk:nth-child(2) {
        order: 2 !important;
        text-align: center !important;
        margin-bottom: 15px !important;
    }
    
    .fc-toolbar-chunk:nth-child(2) .fc-button-group {
        display: inline-flex !important;
        gap: 10px !important;
    }
    
    .fc-toolbar-chunk:nth-child(2) .fc-button {
        padding: 12px 16px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        min-width: 80px !important;
    }
    
    /* View buttons section - FORCE NEW LINE */
    .fc-toolbar-chunk:nth-child(3) {
        order: 3 !important;
        display: block !important;
        width: 100% !important;
        clear: both !important;
        margin-top: 20px !important;
    }
    
    .fc-toolbar-chunk:nth-child(3) .fc-button-group {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 350px !important;
        margin: 0 auto !important;
    }
    
    /* Individual view buttons */
    .fc-toolbar-chunk:nth-child(3) .fc-button {
        width: 100% !important;
        padding: 16px 8px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        min-height: 50px !important;
        text-align: center !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        color: #1d1d1f !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .fc-toolbar-chunk:nth-child(3) .fc-button:hover {
        background: rgba(255, 255, 255, 0.25) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
    }
    
    .fc-toolbar-chunk:nth-child(3) .fc-button-active,
    .fc-toolbar-chunk:nth-child(3) .fc-button:disabled {
        background: linear-gradient(135deg, rgba(0, 122, 255, 0.9), rgba(0, 100, 210, 0.9)) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
        color: white !important;
        box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4) !important;
        transform: translateY(-2px) !important;
    }
}

/* Smaller screens - maintain 3 columns layout */
@media (max-width: 480px) {
    .fc-toolbar-chunk:last-child .fc-button-group {
        max-width: 320px !important;
        gap: 6px !important;
    }
    
    .fc-toolbar-chunk:last-child .fc-button {
        padding: 12px 8px !important;
        font-size: 13px !important;
        min-height: 46px !important;
    }
    
    .fc-toolbar-title {
        font-size: 18px !important;
    }
}
