/**
 * VNomy Events - Frontend Styles
 */

/* Events Calendar */
.vnomy-events-calendar {
    margin: 20px 0;
}

.vnomy-events-calendar .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.vnomy-events-calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #ddd;
}

.vnomy-events-calendar .calendar-day-header {
    background: #f5f5f5;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.vnomy-events-calendar .calendar-day {
    background: #fff;
    min-height: 100px;
    padding: 5px;
}

.vnomy-events-calendar .calendar-day.has-events {
    background: #e3f2fd;
}

.vnomy-events-calendar .calendar-day.today {
    background: #fff3e0;
}

/* Events List */
.vnomy-events-list {
    margin: 20px 0;
}

.vnomy-event-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.vnomy-event-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vnomy-event-card .event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.vnomy-event-card .event-title {
    font-size: 1.5em;
    margin: 0;
    color: #333;
}

.vnomy-event-card .event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9em;
}

.vnomy-event-card .event-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vnomy-event-card .event-description {
    color: #555;
    line-height: 1.6;
}

.vnomy-event-card .event-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Event Submission Form */
.vnomy-events-submit {
    max-width: 800px;
    margin: 0 auto;
}

.vnomy-events-submit form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vnomy-events-submit .form-group {
    margin-bottom: 20px;
}

.vnomy-events-submit label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.vnomy-events-submit input[type="text"],
.vnomy-events-submit input[type="email"],
.vnomy-events-submit input[type="tel"],
.vnomy-events-submit input[type="date"],
.vnomy-events-submit input[type="time"],
.vnomy-events-submit input[type="number"],
.vnomy-events-submit input[type="url"],
.vnomy-events-submit select,
.vnomy-events-submit textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.vnomy-events-submit textarea {
    min-height: 150px;
    resize: vertical;
}

.vnomy-events-submit .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .vnomy-events-submit .form-row {
        grid-template-columns: 1fr;
    }
}

.vnomy-events-submit .submit-btn {
    background: #4CAF50;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.vnomy-events-submit .submit-btn:hover {
    background: #45a049;
}

.vnomy-events-submit .submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Single Event */
.vnomy-events-single {
    max-width: 900px;
    margin: 0 auto;
}

.vnomy-events-single .event-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.vnomy-events-single .event-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vnomy-events-single .event-info-box {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.vnomy-events-single .event-info-box p {
    margin: 10px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.vnomy-events-single .event-info-box strong {
    min-width: 100px;
}

/* Status Badges */
.vnomy-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.vnomy-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.vnomy-status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.vnomy-status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

.vnomy-status-badge.expired {
    background: #e2e3e5;
    color: #383d41;
}

/* Loading Spinner */
.vnomy-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Messages */
.vnomy-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.vnomy-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vnomy-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.vnomy-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Filters */
.vnomy-events-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.vnomy-events-filters select,
.vnomy-events-filters input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.vnomy-events-filters button {
    padding: 10px 20px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.vnomy-events-filters button:hover {
    background: #45a049;
}

/* Responsive */
@media (max-width: 768px) {
    .vnomy-events-calendar .calendar-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .vnomy-event-card .event-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .vnomy-events-single .event-image {
        height: 250px;
    }
}

/* =============================================
   Calendar Design Styles (from Canvas design)
   ============================================= */

:root {
    --vnomy-primary-red: #c41e3a;
    --vnomy-primary-yellow: #ffcd00;
    --vnomy-dark: #1a1a1a;
    --vnomy-light: #f5f5f5;
    --vnomy-gray: #666;
    --vnomy-border: #ddd;
    --vnomy-category-festival: #c41e3a;
    --vnomy-category-concert: #d4af37;
    --vnomy-category-food: #ff6b35;
    --vnomy-category-temple: #8b4513;
    --vnomy-category-sports: #22c55e;
    --vnomy-category-cultural: #3b82f6;
    --vnomy-category-meeting: #6b7280;
    --vnomy-category-other: #6366f1;
}

/* Main Layout */
.vnomy-events-main-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.vnomy-events-content-area {
    min-width: 0;
}

.vnomy-events-page-title {
    font-size: 2rem;
    color: var(--vnomy-primary-red);
    margin-bottom: 1.5rem;
}

/* Search & Filters */
.vnomy-events-search-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.vnomy-events-search-row {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vnomy-events-search-row input,
.vnomy-events-search-row select {
    padding: 0.75rem;
    border: 2px solid var(--vnomy-border);
    border-radius: 6px;
    font-size: 0.95rem;
}

.vnomy-events-search-row input:focus,
.vnomy-events-search-row select:focus {
    outline: none;
    border-color: var(--vnomy-primary-red);
}

.vnomy-events-search-btn {
    padding: 0.75rem 1.5rem;
    background: var(--vnomy-primary-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.vnomy-events-search-btn:hover {
    background: #a01830;
}

.vnomy-events-filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.vnomy-events-date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vnomy-events-date-range input {
    padding: 0.5rem;
    border: 2px solid var(--vnomy-border);
    border-radius: 6px;
    font-size: 0.9rem;
}

.vnomy-events-date-sep {
    color: var(--vnomy-gray);
}

/* View Toggle */
.vnomy-events-view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.vnomy-events-view-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--vnomy-border);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vnomy-events-view-btn:hover {
    border-color: var(--vnomy-primary-red);
}

.vnomy-events-view-btn.active {
    background: var(--vnomy-primary-red);
    color: white;
    border-color: var(--vnomy-primary-red);
}

.vnomy-events-weekend-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
    margin-left: auto;
}

.vnomy-events-weekend-btn:hover {
    transform: translateY(-2px);
}

/* Calendar View */
.vnomy-events-calendar-view {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.vnomy-events-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--vnomy-border);
}

.vnomy-events-calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vnomy-events-calendar-nav-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--vnomy-border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.vnomy-events-calendar-nav-btn:hover {
    border-color: var(--vnomy-primary-red);
    color: var(--vnomy-primary-red);
}

.vnomy-events-current-month {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--vnomy-primary-red);
    min-width: 200px;
    text-align: center;
}

.vnomy-events-today-btn {
    padding: 0.5rem 1rem;
    background: var(--vnomy-primary-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.vnomy-events-today-btn:hover {
    background: #a01830;
}

.vnomy-events-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.vnomy-events-calendar-day-header {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    background: #fafafa;
    border-bottom: 1px solid var(--vnomy-border);
    color: var(--vnomy-gray);
}

.vnomy-events-calendar-day {
    min-height: 120px;
    padding: 0.75rem;
    border-right: 1px solid var(--vnomy-border);
    border-bottom: 1px solid var(--vnomy-border);
    cursor: pointer;
    transition: background 0.3s;
}

.vnomy-events-calendar-day:hover {
    background: #fef5f6;
}

.vnomy-events-calendar-day.vnomy-events-other-month {
    background: #f9f9f9;
}

.vnomy-events-other-month .vnomy-events-day-number {
    color: #999;
}

.vnomy-events-calendar-day.vnomy-events-today {
    background: #fef5f6;
}

.vnomy-events-day-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.vnomy-events-today .vnomy-events-day-number {
    background: var(--vnomy-primary-red);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vnomy-events-event-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.vnomy-events-event-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.vnomy-events-event-dot:hover {
    transform: scale(1.3);
}

/* List View */
.vnomy-events-list-view {
    display: none;
}

.vnomy-events-event-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
    display: grid;
    grid-template-columns: 200px 1fr;
    transition: transform 0.3s, box-shadow 0.3s;
}

.vnomy-events-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.vnomy-events-event-image-placeholder {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--vnomy-primary-red) 0%, var(--vnomy-primary-yellow) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.vnomy-events-event-details {
    padding: 1.5rem;
}

.vnomy-events-event-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

.vnomy-events-event-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--vnomy-dark);
    margin: 0 0 0.5rem 0;
}

.vnomy-events-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--vnomy-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.vnomy-events-event-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.vnomy-events-event-desc {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.vnomy-events-fee-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.vnomy-events-fee-free {
    background: #d1fae5;
    color: #059669;
}

.vnomy-events-fee-paid {
    background: #fef3c7;
    color: #d97706;
}

.vnomy-events-fee-donation {
    background: #e0e7ff;
    color: #4f46e5;
}

.vnomy-events-more-info-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--vnomy-primary-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.vnomy-events-more-info-btn:hover {
    background: #a01830;
    color: white;
    text-decoration: none;
}

.vnomy-events-no-results {
    text-align: center;
    padding: 3rem;
    color: var(--vnomy-gray);
}

/* Sidebar */
.vnomy-events-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vnomy-events-sidebar-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

.vnomy-events-submit-cta {
    background: linear-gradient(135deg, var(--vnomy-primary-red) 0%, #a01830 100%);
    color: white;
    text-align: center;
}

.vnomy-events-submit-cta h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.vnomy-events-submit-cta p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.vnomy-events-submit-cta-btn {
    width: 100%;
    padding: 1rem;
    background: white;
    color: var(--vnomy-primary-red);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.vnomy-events-submit-cta-btn:hover {
    transform: translateY(-2px);
}

.vnomy-events-sidebar-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--vnomy-primary-red);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--vnomy-border);
}

.vnomy-events-featured-event {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--vnomy-border);
}

.vnomy-events-featured-event:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.vnomy-events-featured-event:first-child {
    padding-top: 0;
}

.vnomy-events-featured-image-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--vnomy-primary-red) 0%, var(--vnomy-primary-yellow) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.vnomy-events-featured-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.vnomy-events-featured-info p {
    font-size: 0.85rem;
    color: var(--vnomy-gray);
    margin: 0;
}

.vnomy-events-featured-date {
    font-size: 0.85rem;
    color: var(--vnomy-primary-red);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Event Modal */
.vnomy-events-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.vnomy-events-modal.vnomy-events-modal-active {
    display: flex;
}

.vnomy-events-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.vnomy-events-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--vnomy-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vnomy-events-modal-header h3 {
    font-size: 1.3rem;
    color: var(--vnomy-primary-red);
    margin: 0;
}

.vnomy-events-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.vnomy-events-modal-close:hover {
    background: var(--vnomy-primary-red);
    color: white;
}

.vnomy-events-modal-body {
    padding: 1.5rem;
}

.vnomy-events-modal-event {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--vnomy-border);
}

.vnomy-events-modal-event:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.vnomy-events-modal-event h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.vnomy-events-modal-event p {
    margin: 0.25rem 0;
    color: var(--vnomy-gray);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .vnomy-events-main-layout {
        grid-template-columns: 1fr;
    }

    .vnomy-events-sidebar {
        order: -1;
    }

    .vnomy-events-search-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .vnomy-events-search-row {
        grid-template-columns: 1fr;
    }

    .vnomy-events-event-card {
        grid-template-columns: 1fr;
    }

    .vnomy-events-event-image-placeholder {
        width: 100%;
        height: 200px;
    }

    .vnomy-events-calendar-day {
        min-height: 80px;
        padding: 0.5rem;
    }

    .vnomy-events-day-number {
        font-size: 0.9rem;
    }

    .vnomy-events-event-dots {
        gap: 2px;
    }

    .vnomy-events-event-dot {
        width: 8px;
        height: 8px;
    }

    .vnomy-events-view-toggle {
        flex-wrap: wrap;
    }

    .vnomy-events-weekend-btn {
        margin-left: 0;
        width: 100%;
    }
}
