/* Event Detail Page Styles */

/* Main Container */
.event-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 48px 24px;
    font-size: 1.1rem;
    color: #666;
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 16px 24px;
    margin: 24px;
    color: #c33;
    text-align: center;
}

/* Hero Image Section */
.event-hero {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f0f0f0;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
    overflow-x: auto;
    scrollbar-width: thin;
}

.tab-button {
    flex: 1;
    min-width: 120px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button:hover {
    background: #e8e8e8;
    color: #333;
}

.tab-button.active {
    background: white;
    color: #111;
    border-bottom-color: #111;
}

.tab-button:focus {
    outline: 2px solid #4A90E2;
    outline-offset: -2px;
}

/* Tab Panels */
.tab-panels {
    background: white;
    padding: 24px;
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #111;
    font-size: 1.5rem;
}

/* Info Table */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.info-table tr {
    border-bottom: 1px solid #eee;
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 12px 8px;
    vertical-align: top;
}

.info-table td:first-child {
    font-weight: 600;
    color: #333;
    width: 200px;
}

.info-table td:last-child {
    color: #666;
}

/* Text Content */
.text-content {
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
}

.text-content:empty::before {
    content: "No information available.";
    color: #999;
    font-style: italic;
}

/* Registration Section */
.registration-section {
    background: #f9f9f9;
    padding: 32px 24px;
    margin-top: 32px;
    border-radius: 8px;
}

.registration-section h2 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #111;
    text-align: center;
}

/* Countdown Timer */
.countdown-timer {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.countdown-timer h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 1.2rem;
}

.countdown-display {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-size: 3rem;
    font-weight: bold;
    color: #111;
    line-height: 1;
}

.countdown-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    text-transform: uppercase;
}

/* Registration Closed / Already Registered Messages */
.registration-closed,
.already-registered {
    text-align: center;
    padding: 24px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin-bottom: 24px;
}

.registration-closed p,
.already-registered p {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: #856404;
    font-weight: 600;
}

.already-registered p:first-child {
    margin-bottom: 16px;
}

.already-registered .payment-ref {
    font-weight: normal;
    margin-bottom: 16px;
}

/* Registration Confirmation (Light Green - shown immediately after registration) */
.registration-confirmation {
    text-align: center;
    padding: 24px;
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 8px;
    margin-bottom: 24px;
}

.registration-confirmation p {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: #155724;
}

.registration-confirmation .confirmation-title {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.registration-confirmation .payment-ref {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

/* Pay Now Button */
.pay-now-btn {
    display: inline-block;
    margin-top: 8px;
    text-decoration: none;
}

/* Payment Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

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

.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-refunded {
    background: #cce5ff;
    color: #004085;
}

/* Payment status in boxes */
.payment-status {
    font-weight: normal;
    margin-bottom: 16px;
}

/* Registration Form */
.registration-form {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.instructions {
    margin-bottom: 24px;
    padding: 16px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
}

.instructions h3 {
    margin: 0 0 8px 0;
    color: #1976d2;
    font-size: 1.1rem;
}

.instructions p {
    margin: 0;
    color: #333;
    line-height: 1.6;
}

/* Registration Table */
.registration-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.registration-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.registration-table thead {
    background: #f5f5f5;
}

.registration-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.registration-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.registration-table input[type="text"],
.registration-table select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.registration-table input[type="text"]:focus,
.registration-table select:focus {
    outline: none;
    border-color: #111;
}

.registration-table input[type="text"]:disabled,
.registration-table select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Member Search Autocomplete */
.member-search-container {
    position: relative;
    margin-bottom: 0;
    transition: margin-bottom 0.2s ease;
}

.member-search-container.dropdown-visible {
    margin-bottom: 220px;
}

.member-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.member-search-result {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.member-search-result:hover {
    background: #f5f5f5;
    color: #111;
}

.member-search-result:last-child {
    border-bottom: none;
}

.member-search-no-results {
    padding: 10px 12px;
    color: #999;
    font-style: italic;
}

/* Remove Row Button */
.remove-row-button {
    background: #ef5350;
    color: white;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.remove-row-button:hover {
    background: #c62828;
}

.remove-row-button:focus {
    outline: 2px solid #ef5350;
    outline-offset: 2px;
}

/* Add Member Button */
.add-member-container {
    text-align: center;
    margin-bottom: 20px;
}

/* Total Cost */
.total-cost-container {
    text-align: right;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.total-cost-amount {
    color: #2e7d32;
    font-weight: bold;
    font-size: 1.4rem;
    margin-left: 12px;
}

/* Cost display in registration table - explicit color to override theme */
.cost-display {
    color: #333;
    font-weight: 600;
}

/* Time Slot Container */
.time-slot-container {
    margin-bottom: 20px;
}

.time-slot-container label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-select {
    width: 100%;
    max-width: 300px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Terms & Conditions */
.terms-container {
    margin-bottom: 20px;
    padding: 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.terms-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.terms-checkbox label {
    margin: 0;
    cursor: pointer;
    color: #333;
}

.terms-checkbox a {
    color: #2196f3;
    text-decoration: underline;
}

/* Error and Success Messages */
.registration-errors,
.registration-success {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.registration-errors {
    background: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
}

.registration-success {
    background: #e8f5e9;
    border: 1px solid #66bb6a;
    color: #2e7d32;
}

.registration-errors ul,
.registration-success ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.registration-errors li,
.registration-success li {
    margin-bottom: 4px;
}

/* Register Button */
.register-button-container {
    text-align: center;
}

#register-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Back Button */
.back-button-container {
    text-align: center;
    padding: 32px 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-hero {
        height: 200px;
    }

    .tab-button {
        min-width: 100px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .tab-panels {
        padding: 16px;
    }

    .countdown-display {
        gap: 16px;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .info-table td:first-child {
        width: 140px;
        font-size: 0.9rem;
    }

    .registration-table {
        font-size: 0.9rem;
    }

    .registration-table th,
    .registration-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .countdown-display {
        gap: 12px;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.75rem;
    }

    .info-table td:first-child {
        display: block;
        width: 100%;
        font-weight: bold;
        padding-bottom: 4px;
    }

    .info-table td:last-child {
        display: block;
        width: 100%;
        padding-top: 0;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden !important;
}
