/* Events Plugin Frontend Styles */

.events-calendar-container {
    max-width: 800px;
    margin: 0 auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.calendar-nav {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
}

.calendar-nav:hover {
    background: #005a87;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border: 1px solid #ddd;
}

.calendar-day-header {
    background: #f8f9fa;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.calendar-day {
    background: white;
    min-height: 100px;
    padding: 5px;
    position: relative;
}

.calendar-day.empty {
    background: #f8f9fa;
}

.calendar-day.today {
    background: #e3f2fd;
}

.calendar-day.has-events {
    background: #fff3cd;
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.day-events {
    font-size: 12px;
}

.day-event {
    background: #007cba;
    color: white;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 2px;
    display: block;
    text-decoration: none;
}

.day-event.more {
    background: #6c757d;
}

.calendar-legend {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

/* Events List Styles */

.events-list {
    display: grid;
    gap: 20px;
}

.event-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
}

.event-header {
    margin-bottom: 15px;
}

.event-title {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: #333;
}

.event-meta {
    color: #666;
    font-size: 14px;
}

.event-meta > span {
    display: inline-block;
    margin-right: 15px;
}

.event-content {
    margin-bottom: 15px;
}

.event-description {
    margin-bottom: 10px;
    color: #555;
}

.event-actions {
    margin-top: 15px;
}

.event-actions .button {
    margin-right: 10px;
}

/* User Dashboard Styles */

.user-events-dashboard {
    max-width: 800px;
    margin: 0 auto;
}

.dashboard-section {
    margin-bottom: 30px;
}

.dashboard-section h3 {
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Registration Form Styles */

.event-registration-form {
    max-width: 600px;
    margin: 0 auto;
}

.event-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.event-summary h4 {
    margin: 0 0 10px 0;
    color: #007cba;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    /* width: 100%; */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.payment-section {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.payment-highlight {
    border-color: #007cba;
    box-shadow: 0 0 18px rgba(0, 123, 255, 0.25);
}

.payment-required-note {
    margin-bottom: 12px;
    font-weight: bold;
    color: #333;
}

.payment-required-amount {
    margin-left: 6px;
    color: #007cba;
}

/* Event Details Styles */

.event-details {
    max-width: 800px;
    margin: 0 auto;
}

.event-info p {
    margin: 5px 0;
}

.registration-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.registration-status.registered {
    background: #d4edda;
    color: #155724;
}

.registration-status.waitlist {
    background: #fff3cd;
    color: #856404;
}

.registration-status.attended {
    background: #d1ecf1;
    color: #0c5460;
}

.registration-status.restricted {
    background: #f8d7da;
    color: #721c24;
}

.registration-status.full {
    background: #f8d7da;
    color: #721c24;
}

/* Ticket Styles */

.event-ticket {
    font-family: 'Courier New', monospace;
}

/* Responsive Design */

@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        gap: 10px;
    }

    .calendar-grid {
        font-size: 14px;
    }

    .calendar-day {
        min-height: 80px;
    }

    .events-list {
        grid-template-columns: 1fr;
    }

    .event-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* ==================== NEW EVENTS GRID LAYOUT ==================== */

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.event-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.event-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-card-image img {
    transform: scale(1.05);
}

.event-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-card-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    min-height: 2.8em;
}

.event-card-meta {
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

.event-card-meta > div {
    margin-bottom: 6px;
}

.event-card-description {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    min-height: 3em;
}

.events-no-found {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #666;
}

.event-card-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-view-details,
.btn-register,
.btn-login,
.btn-registered {
    flex: 1;
    min-width: 100px;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-view-details {
    background-color: #000;
    color: #F5DF4D;
}

.btn-view-details:hover {
    background-color: #222;
    color: #FFF;
}

.btn-register {
    background-color: #F5DF4D;
    color: #000;
}

.btn-register:hover {
    background-color: #FFE680;
    color: #000;
    font-weight: 700;
}

.btn-login {
    background-color: #000;
    color: #F5DF4D;
}

.btn-login:hover {
    background-color: #222;
    color: #FFF;
}

.btn-registered {
    background-color: #F5DF4D;
    color: #000;
    cursor: default;
    opacity: 0.85;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .event-card-title {
        font-size: 16px;
    }

    .event-card-content {
        padding: 15px;
    }

    .event-card-actions {
        flex-wrap: wrap;
    }

    .btn-view-details,
    .btn-register,
    .btn-login,
    .btn-registered {
        flex: 1 1 45%;
    }
}
