/**
 * Frontend CSS for Vinticards Events Planner
 */

/* Events List */
.vep-events-list {
    margin: 30px 0;
}

.vep-events-list h2 {
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    font-weight: 300;
    font-size: 1.2em;
    letter-spacing: 1px;
}

.vep-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Event Cards */
.vep-event-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    max-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vep-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #000 0%, #333 100%);
}

.vep-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #000;
}

.vep-event-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.vep-event-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
    flex: 1;
    letter-spacing: 0.5px;
}

.vep-event-logo {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.vep-event-details {
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 5px;
    align-items: start;
}

.vep-event-details p {
    margin: 3px 0;
    color: #555;
    line-height: 1.3;
    font-size: 11px;
}

.vep-event-details strong {
    color: #1a1a1a;
    font-weight: 600;
    letter-spacing: 0.3px;
    font-size: 11px;
}

.vep-event-actions {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: fit-content;
}

.vep-event-actions .button {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.vep-event-actions .button:hover {
    background: #fff;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.vep-event-actions .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Status Colors */
.vep-event-full {
    color: #dc3545;
    font-weight: 600;
}

.vep-event-available {
    color: #28a745;
    font-weight: 600;
}

/* Calendar Container */
.vep-calendar-container {
    margin: 30px 0;
}

.vep-calendar-container h2 {
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dadada;
    font-weight: 300;
    font-size: 1.2em;
    letter-spacing: 1px;
}

#vep-frontend-calendar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* My Registrations */
.vep-my-registrations {
    margin: 20px 0;
}

.vep-my-registrations h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    font-size: 1.2em;
}

.vep-registrations-list {
    display: grid;
    gap: 20px;
}

.vep-registration-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vep-registration-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.vep-registration-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
    flex: 1;
}

.vep-registration-details {
    margin-bottom: 20px;
}

.vep-registration-details p {
    margin: 8px 0;
    color: #666;
    line-height: 1.4;
}

.vep-registration-details strong {
    color: #333;
    font-weight: 600;
}

.vep-registration-actions {
    text-align: center;
}

/* Professional Modal Styles */
.vep-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vep-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vep-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
}

.vep-modal-header h2 {
    margin: 0;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.vep-modal-close {
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vep-modal-close:hover {
    color: #1a1a1a;
    background: #f3f4f6;
    transform: scale(1.05);
}

.vep-modal-body {
    padding: 20px;
}

.vep-modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95em;
    letter-spacing: 0.01em;
}

.vep-modal-body input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1a1a1a;
    box-sizing: border-box;
}

.vep-modal-body input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
    background: #ffffff;
}

.vep-modal-body .button {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    margin-right: 12px;
    border: none;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.01em;
    min-width: 120px;
}

.vep-modal-body .button-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.vep-modal-body .button-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.4);
}

.vep-modal-body .button:not(.button-primary) {
    background: #f8f9fa;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.vep-modal-body .button:not(.button-primary):hover {
    background: #f1f3f4;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

/* Professional Event Info in Modals */
.vep-event-info,
.vep-cancellation-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 16px;
    border-radius: 12px;
    margin: 16px 0;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.vep-event-info h3,
.vep-cancellation-info h3 {
    margin: 0 0 12px 0;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.vep-event-info p,
.vep-cancellation-info p {
    margin: 6px 0;
    color: #6b7280;
    line-height: 1.4;
    font-size: 12px;
}

/* Professional Event Detail Modal */
.vep-event-detail-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    z-index: 1001;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

.vep-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: modalFadeIn 0.3s ease-out;
}

.vep-event-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0073aa;
}

.vep-event-detail-header .vep-event-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.vep-event-detail-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    flex: 1;
}

.vep-event-detail-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vep-event-detail-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vep-event-detail-info p {
    margin: 0;
    color: #6b7280;
    line-height: 1.4;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vep-event-detail-info p::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #0073aa;
    border-radius: 50%;
    flex-shrink: 0;
}

.vep-event-detail-info strong {
    color: #1a1a1a;
    font-weight: 600;
    min-width: 80px;
}

.vep-event-detail-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

.vep-event-detail-actions .button {
    min-width: 120px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.01em;
}

/* Professional Modal Layout Enhancements */
.vep-form-section {
    margin-bottom: 16px;
}

.vep-form-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    letter-spacing: 0.01em;
}

.vep-form-section input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 12px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1a1a1a;
    box-sizing: border-box;
}

.vep-form-section input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
    background: #ffffff;
}

.vep-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

.vep-modal-actions .button {
    min-width: 120px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.01em;
}

.vep-event-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.vep-event-meta p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vep-event-meta p::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #0073aa;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Modal Event Header with Icon */
.vep-event-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.vep-event-header .vep-event-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.vep-event-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    flex: 1;
}

/* FullCalendar Customization */
.fc-event {
    cursor: pointer;
    border-radius: 3px;
    padding: 2px 4px;
    margin: 1px 0;
    font-size: 12px;
    line-height: 1.2;
}

.fc-event:hover {
    opacity: 0.8;
}

/* Event with title styling */
.vep-event-with-title {
    display: flex;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.vep-event-logo {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Calendar-specific icon sizing */
.fc .vep-event-logo {
    width: 20px!important;
    height: 20px!important;
    border-radius: 3px;
}

.vep-event-dot {
    width: 40px;
    height: 40px;
    background-color: #0073aa;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Calendar-specific dot sizing */
.fc .vep-event-dot {
    width: 20px;
    height: 20px;
}

.vep-event-title-text {
    font-size: 10px;
    line-height: 1.0;
    max-width: calc(100% - 42px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Calendar-specific title text spacing */
.fc .vep-event-title-text {
    max-width: calc(100% - 22px);
}

/* Calendar day sizing */
.fc-daygrid-day {
    min-height: 20px;
}

.fc-daygrid-day-events {
    min-height: 15px;
}

/* Calendar container width */
.vep-calendar-container {
    margin: 20px 0;
    width: 100%;
    max-width: 800px;
}

#vep-frontend-calendar {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
}

/* Force FullCalendar to be smaller */
.fc {
    font-size: 12px !important;
}

.fc .fc-toolbar {
    font-size: 12px !important;
}

.fc .fc-button {
    font-size: 11px !important;
    padding: 4px 8px !important;
}

.fc .fc-daygrid-day-frame {
    min-height: 25px !important;
    height: auto !important;
}

.fc .fc-daygrid-day-events {
    min-height: 20px !important;
    height: auto !important;
}

.fc .fc-daygrid-day {
    min-height: 25px !important;
    height: auto !important;
}

.fc .fc-daygrid-day-frame .fc-daygrid-day-events {
    min-height: 20px !important;
    height: auto !important;
    max-height: none !important;
}

.fc .fc-daygrid-day-frame .fc-daygrid-day-events .fc-daygrid-event-harness {
    height: auto !important;
    max-height: none !important;
    margin-bottom: 2px !important;
}

.fc .fc-daygrid-day-frame .fc-daygrid-day-events .fc-daygrid-event-harness .fc-event {
    height: auto !important;
    max-height: none !important;
    line-height: 12px !important;
    margin-bottom: 1px !important;
}

/* Multiple events styling */
.vep-multiple-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vep-stacked-event {
    margin-bottom: 2px;
}

/* Tooltip styling */
.vep-event-logo:hover,
.vep-event-dot:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Tabbed Interface */
.vep-tabs-container {
    margin: 30px 0;
}

.vep-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.vep-tab-button {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    letter-spacing: 0.5px;
}

.vep-tab-button:hover {
    color: #000;
    background: #f8f8f8;
}

.vep-tab-button.active {
    color: #000;
    border-bottom-color: #000;
    font-weight: 600;
}

.vep-tab-content {
    display: none;
}

.vep-tab-content.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vep-events-grid {
        grid-template-columns: 1fr;
    }
    
    .vep-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .vep-modal-header,
    .vep-modal-body {
        padding: 15px;
    }
    
    .vep-modal-body input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .vep-event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vep-event-header h3 {
        margin-bottom: 10px;
    }
    
    .vep-event-logo {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .vep-event-card {
        padding: 15px;
    }
    
    .vep-modal-content {
        width: 98%;
        margin: 5px;
    }
    
    .vep-modal-header h2 {
        font-size: 1.1em;
    }
    
    .vep-modal-body .button {
        width: 100%;
        margin: 5px 0;
    }
}

/* Loading States */
.vep-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.vep-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: vep-spin 1s linear infinite;
}

@keyframes vep-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notices */
.vep-notice {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 5px;
    border-left: 4px solid;
}

.vep-notice-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.vep-notice-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.vep-notice-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.vep-notice-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Menu Item */
.vep-menu-item a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.vep-menu-item a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Accessibility */
.vep-modal:focus {
    outline: none;
}

.vep-modal-content:focus {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .vep-event-card {
        border: 2px solid #000;
    }
    
    .vep-modal-content {
        border: 2px solid #000;
    }
    
    .vep-event-full {
        color: #000;
    }
    
    .vep-event-available {
        color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .vep-event-card {
        transition: none;
    }
    
    .vep-loading::after {
        animation: none;
    }
}

/* Collapsible Events */
.vep-events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dadada;
}

.vep-events-header h2 {
    margin: 0;
    color: #1a1a1a;
    font-weight: 300;
    font-size: 1.2em;
    letter-spacing: 1px;
}

.vep-toggle-events {
    background: #74808b;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.vep-toggle-events:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.vep-toggle-events:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.vep-toggle-events[aria-expanded="true"] .vep-toggle-icon {
    transform: rotate(180deg);
}

.vep-toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.vep-events-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.vep-events-content.show {
    display: block !important;
}

/* Animation for smooth expand/collapse */
.vep-events-content {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.vep-events-content.show {
    max-height: 2000px;
    opacity: 1;
}

/* Responsive design for collapsible */
@media (max-width: 768px) {
    .vep-events-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .vep-toggle-events {
        align-self: flex-end;
    }
}
