/* Event Reservation System - Frontend Styles */

.ers-events-container {
    margin: 20px auto;
    max-width: 1320px;
}

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

.ers-events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ers-event-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    min-height: 100px;
}

.ers-event-item:not(.ers-full):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ers-event-item.ers-full {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Event Type Specific Colors */
.ers-event-item.ers-event-type-lesjesmiddagen {
    background-color: #78368c !important; /* Purple */
}

.ers-event-item.ers-event-type-openhuis {
    background-color: #68a457 !important; /* Green */
}

.ers-event-item.ers-event-type-voorlichting {
    background-color: #fe7237 !important; /* Orange */
}

/* Left Section - Date and Time */
.ers-event-left {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 24px;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.ers-event-date {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ers-event-time {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ers-event-date .ers-icon,
.ers-event-time .ers-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    opacity: 1;
}

/* Middle Section - Title */
.ers-event-middle {
    flex: 1;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

.ers-event-title {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Right Section - Button */
.ers-event-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Legacy table styles - keeping for backward compatibility if needed */
.ers-events-table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.ers-events-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.ers-events-table th,
.ers-events-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ers-events-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.ers-events-table tr:hover {
    background: #f8f9fa;
}

.ers-event-row {
    cursor: pointer;
    transition: background 0.2s ease;
}

.ers-event-row.ers-full {
    cursor: not-allowed;
    opacity: 0.6;
    background: #f5f5f5;
}

.ers-event-row:not(.ers-full):hover {
    background: #e7f3ff;
}

.ers-full-badge {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.4);
}

.ers-reserve-btn {
    background: #fff;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ers-reserve-btn:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ers-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    vertical-align: middle;
    margin-right: 6px;
}

.ers-reserve-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ers-reserve-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.ers-full-text {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    white-space: nowrap;
}

.ers-info-text {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    border-left: 4px solid #007cba;
}

.ers-info-text p {
    margin: 5px 0;
}

/* Modal Styles */
.ers-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ers-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.ers-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.ers-modal-close:hover {
    color: #333;
}

/* Form Styles */
.ers-reservation-form {
    max-width: 500px;
}

.ers-reservation-form h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2330;
    margin-bottom: 12px;
    line-height: 1.4;
}

.ers-form-description {
    color: #4b5563;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Form Row - Two fields side by side */
.ers-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.ers-form-row .ers-form-group {
    flex: 1;
    margin-bottom: 0;
}

.ers-form-group {
    margin-bottom: 20px;
}

.ers-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ers-form-group input,
.ers-form-group select,
.ers-form-group textarea {
    width: 100%;
    padding: 12px 14px !important;
    border: 1px solid #d6d9e0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    height: 48px !important;
    background: #f7f8fc !important;
    color: #1f2330 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ers-form-group input:focus,
.ers-form-group select:focus,
.ers-form-group textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124,58,237,0.15);
    background: #fff;
}

/* Placeholder styling */
.ers-form-group input::placeholder,
.ers-form-group textarea::placeholder {
    color: #8b92a6;
}

/* Enhance reservation modal form visuals */
.ers-modal .ers-reservation-form {
    background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
    padding: 16px;
    border-radius: 12px;
}

.ers-modal .ers-reservation-form h3 {
    color: #008a59 !important;
}

/* Phone Input Wrapper */
.ers-phone-input-wrapper {
    display: flex;
    gap: 8px;
    width: 100%;
}

.ers-phone-country {
    flex: 0 0 120px;
    padding: 12px 14px !important;
    border: 1px solid #d6d9e0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    height: 48px !important;
    background: #f7f8fc !important;
    color: #1f2330 !important;
    cursor: pointer;
}

.ers-phone-input-wrapper input[type="tel"] {
    flex: 1;
    width: auto !important;
}

/* Checkbox Group Wrapper - Smaller width */
.ers-checkbox-group-wrapper {
    max-width: 400px;
}

/* Checkbox Group */
.ers-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ers-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: none;
}

.ers-checkbox-group label:hover {
    background: transparent;
    border: none;
}

.ers-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px !important;
    margin-right: 12px;
    padding: 0px !important;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 0 !important;
}

.ers-checkbox-group input[type="checkbox"]:checked + span {
    font-weight: 500;
}

.ers-checkbox-group label:has(input[type="checkbox"]:checked) {
    border: none;
    background: transparent;
}

/* Agreement Checkbox */
.ers-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    font-weight: normal !important;
    cursor: pointer;
    gap: 12px;
    padding: 0 !important;
    border-radius: 0 !important;
}

.ers-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px !important;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 0 !important;
    padding: 0 !important;
}

.ers-checkbox-label span {
    line-height: 1.5;
    color: #333;
}

.ers-agreement-highlight {
    color: #16a34a !important;
    font-weight: 600;
}

/* Improve radio group spacing */
.ers-radio-group label {
    background: #f7f8fc;
    border: 1px solid #d6d9e0;
    padding: 10px 12px;
    border-radius: 10px;
}

.ers-radio-group input[type="radio"]:checked + span,
.ers-radio-group input[type="radio"]:checked + label {
    border-color: #7c3aed;
}

/* Buttons polish */
.ers-submit-btn {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.ers-cancel-btn {
    background: #64748b;
}

.ers-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ers-radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.ers-radio-group input[type="radio"] {
    width: 20px;
    height: 20px !important;
    margin-right: 8px;
    padding: 0px !important;
}

.ers-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    justify-content: flex-end;
}

.ers-submit-btn,
.ers-cancel-btn {
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 120px;
}

.ers-submit-btn {
    background: #78368c;
    color: white;
    border: none;
}

.ers-submit-btn:hover {
    background: #5d2a6a;
}

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

.ers-cancel-btn {
    background: white;
    color: #333;
    border: 2px solid #d6d9e0;
}

.ers-cancel-btn:hover {
    background: #f7f8fc;
    border-color: #cbd5e0;
}

/* Thank you message styles */
.ers-thankyou {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 12px;
}

.ers-thankyou-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e6f8ee;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.ers-thankyou h3 {
    margin: 8px 0 6px;
    color: #1f2330;
}

.ers-thankyou p {
    color: #4b5563;
    margin-bottom: 18px;
}

.ers-thankyou-close {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #64748b;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.ers-thankyou-close:hover {
    background: #475569;
}

/* Reservations Management */
.ers-reservations-management {
    padding: 40px 0;
    margin-left: auto;
    margin-right: auto;
    max-width: 1140px;
    padding-left: 16px;
    padding-right: 16px;
}

/* Support inner container class used by the template */
.ers-reservations-management .container {
    margin-left: auto;
    margin-right: auto;
    max-width: 1140px;
    padding-left: 0;
    padding-right: 0;
}

.ers-reservation-lookup {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    margin-top: 90px;
}

.ers-reservations-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.ers-reservations-table th,
.ers-reservations-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ers-reservations-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.ers-reservations-table tr:hover {
    background: #f8f9fa;
}

.ers-reservations-table tbody tr {
    cursor: pointer;
    transition: background 0.2s ease;
}

.ers-reservations-table tbody tr:hover {
    background: #e7f3ff;
}

.ers-cancel-reservation-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.ers-cancel-reservation-btn:hover {
    background: #c82333;
}

.ers-cancel-reservation-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ers-reservation-actions {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

.ers-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.ers-action-btn {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 15px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
    text-align: center;
}

.ers-action-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.ers-lookup-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.ers-lookup-btn:hover {
    background: #218838;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ers-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .ers-event-item {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 20px;
        min-height: auto;
        border-radius: 24px;
    }
    
    .ers-event-left {
        flex: 1 1 100%;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-right: none;
        border-bottom: none;
        padding-right: 0;
        padding-bottom: 0;
        gap: 16px;
    }
    
    .ers-event-date,
    .ers-event-time {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 500;
    }
    
    .ers-event-date .ers-icon,
    .ers-event-time .ers-icon {
        width: 18px;
        height: 18px;
        fill: currentColor;
        opacity: 1;
    }
    
    .ers-event-middle {
        flex: 1 1 100%;
        width: 100%;
        padding: 0;
        text-align: center;
    }
    
    .ers-event-title {
        font-size: 20px;
        font-weight: 600;
        justify-content: center;
    }
    
    .ers-event-right {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }
    
    .ers-reserve-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        padding: 14px 32px;
        border-radius: 50px;
        font-size: 16px;
        font-weight: 700;
    }
    
    .ers-full-text {
        width: 100%;
        max-width: 300px;
        text-align: center;
        padding: 14px 32px;
        border-radius: 50px;
    }
    
    .ers-events-table {
        font-size: 14px;
    }
    
    .ers-events-table th,
    .ers-events-table td {
        padding: 8px 10px;
    }
    
    .ers-action-buttons {
        gap: 10px;
    }
    
    .ers-action-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .ers-reservations-table {
        font-size: 14px;
    }
    
    .ers-reservations-table th,
    .ers-reservations-table td {
        padding: 8px 10px;
    }
    
    /* Form responsive - stack fields vertically on mobile */
    .ers-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ers-form-row .ers-form-group {
        margin-bottom: 20px;
    }
    
    .ers-checkbox-group-wrapper {
        max-width: 100%;
    }
}
