/**
 * TVB Events CSS - Komplett neu, simpel, konsistent
 * Basiert auf WordPress Standard Styles
 */

/* ===== EVENTS ARCHIVE PAGE ===== */
.tvb-events-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 60px) clamp(15px, 3vw, 30px);
}

.tvb-events-header {
    text-align: center;
    margin-bottom: 50px;
}

.tvb-events-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--wp--preset--color--tvb-red, #be1a2a);
    margin: 0 0 15px 0;
}

.tvb-events-intro {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* ===== EVENT CARDS GRID ===== */
.tvb-events-list {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(2, 1fr);
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== EINZELNE EVENT CARD ===== */
.tvb-event-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tvb-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tvb-event-card.event-full {
    opacity: 0.85;
}

/* ===== CARD HEADER ===== */
.tvb-event-card-header {
    margin-bottom: 8px !important;
}

.tvb-event-card-title {
    font-size: 1.5rem;
    margin: 0 0 5px 0 !important;
}

.tvb-event-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tvb-event-card-title a:hover {
    color: var(--wp--preset--color--tvb-red, #be1a2a);
}

/* ===== STATUS BADGES ===== */
.tvb-event-card-status {
    margin-bottom: 8px !important;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

/* Badge Styles (für Event Details Shortcode) */
.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 12px;
    margin-left: 8px;
    white-space: nowrap;
    vertical-align: middle;
}

.badge.available {
    background: #d1fae5;
    color: #065f46;
}

.badge.waitlist {
    background: #fef3c7;
    color: #92400e;
}

.badge.full {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== CARD CONTENT ===== */
.tvb-event-card-content {
    flex: 1;
    margin-bottom: 10px !important;
}

.tvb-event-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

/* ===== CARD FOOTER ===== */
.tvb-event-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tvb-event-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 15px;
    font-size: 0.85rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item i {
    color: var(--wp--preset--color--tvb-red, #be1a2a);
}

.event-time {
    margin-left: 5px;
    color: #999;
    font-size: 0.85rem;
}

/* ===== ECKDATEN BOX (Shortcode-Struktur) ===== */
.tvb-event-card-details {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
    padding: 12px !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
}

.tvb-event-card-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tvb-event-card-detail i {
    color: var(--wp--preset--color--tvb-red, #be1a2a);
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* ===== BUTTONS - EXAKT WIE WP STANDARD ===== */
.tvb-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    white-space: nowrap;
}

.tvb-btn-primary {
    background: linear-gradient(135deg, var(--wp--preset--color--tvb-red, #be1a2a) 0%, var(--wp--preset--color--tvb-red-dark, #9a0f22) 100%);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(190, 26, 42, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tvb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(190, 26, 42, 0.25);
}

/* ===== EMPTY STATE ===== */
.tvb-events-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.tvb-events-empty i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.tvb-events-empty p {
    font-size: 1.1rem;
    color: #999;
    margin: 0;
}

/* ===== SINGLE EVENT PAGE ===== */
.tvb-event-details-box {
    max-width: 680px;
    margin: 1.5rem auto 0.75rem auto;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid var(--wp--preset--color--tvb-red, #be1a2a);
    border-radius: 12px;
    padding: 1rem 1.25rem 0.75rem 1.25rem;
    box-shadow: 0 4px 12px rgba(190, 26, 42, 0.1);
}

.tvb-event-details-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem 0;
    color: var(--wp--preset--color--tvb-red, #be1a2a);
    font-size: 1.5rem;
    font-weight: 700;
}

.tvb-event-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tvb-event-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tvb-event-detail-label {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tvb-event-detail-value {
    font-size: 0.95rem;
    color: #111827;
    font-weight: 600;
}

/* ===== EVENT REGISTRATION FORMS ===== */
.tvb-event-registration {
    max-width: 600px;
    margin: 2rem auto;
}

.tvb-form-group {
    margin-bottom: 1.25rem;
}

.tvb-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.tvb-form-group input[type="text"],
.tvb-form-group input[type="email"],
.tvb-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.tvb-form-group input:focus,
.tvb-form-group select:focus {
    outline: none;
    border-color: var(--wp--preset--color--tvb-red, #be1a2a);
}

.required {
    color: var(--wp--preset--color--tvb-red, #be1a2a);
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 767px) {
    .tvb-events-list {
        grid-template-columns: 1fr;
    }

    .tvb-event-card-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tvb-event-card-footer {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .tvb-event-meta {
        width: auto;
        align-items: center;
    }

    .tvb-btn {
        align-self: center;
        width: fit-content;
    }
}

/* ==========================================
   DISPLAY SETTINGS (Participants List Visibility)
   ========================================== */

.tvb-display-settings {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.tvb-display-settings h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--tvb-red, #be1a2a);
}

.tvb-display-settings .description {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 0 15px 0;
}

.tvb-display-settings .tvb-form-group {
    margin-bottom: 15px;
}

.tvb-display-settings .tvb-form-group:last-child {
    margin-bottom: 0;
}

.tvb-display-settings .tvb-checkbox-label small {
    display: block;
    margin-top: 4px;
    margin-left: 24px;
    color: #6c757d;
    line-height: 1.4;
}

.tvb-display-settings .field-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* ==========================================
   PARTICIPANTS LIST MODAL
   ========================================== */

.tvb-participants-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.tvb-participants-modal.active {
    display: flex;
}

.tvb-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.tvb-modal-content {
    position: relative;
    z-index: 10000;
    background: white;
    border-radius: 8px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: tvb-modal-fade-in 0.3s ease;
}

@keyframes tvb-modal-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tvb-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tvb-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--tvb-red, #be1a2a);
}

.tvb-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.tvb-modal-close:hover {
    color: var(--tvb-red, #be1a2a);
}

.tvb-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.tvb-modal-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.tvb-participants-count {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #495057;
}

.tvb-participants-table-wrapper {
    overflow-x: auto;
}

.tvb-participants-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tvb-participants-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--tvb-red, #be1a2a);
}

.tvb-participants-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #212529;
}

.tvb-participants-table th:first-child {
    width: 50px;
    text-align: center;
}

.tvb-participants-table tbody tr {
    border-bottom: 1px solid #dee2e6;
}

.tvb-participants-table tbody tr:hover {
    background: #f8f9fa;
}

.tvb-participants-table td {
    padding: 10px;
}

.tvb-participants-table td.number {
    text-align: center;
    font-weight: 600;
    color: var(--tvb-red, #be1a2a);
}

.tvb-participants-table td.name {
    font-weight: 500;
}

.tvb-no-participants {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.tvb-modal-hint {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

/* View Participants Button */
.tvb-view-participants-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 0.95rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.tvb-view-participants-btn:hover {
    background: var(--tvb-red, #be1a2a);
    color: white;
    border-color: var(--tvb-red, #be1a2a);
}

.tvb-view-participants-btn i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .tvb-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .tvb-modal-header,
    .tvb-modal-body {
        padding: 15px;
    }

    .tvb-participants-table {
        font-size: 0.85rem;
    }

    .tvb-participants-table th,
    .tvb-participants-table td {
        padding: 8px 6px;
    }
}

/* ===== ADMIN VISIBILITY TOGGLE ===== */
.tvb-visibility-toggle {
    padding: 4px 8px !important;
    min-width: 32px;
    height: 28px;
    border: 1px solid #ddd !important;
    background: #fff !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tvb-visibility-toggle .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

/* Visible state (eye icon blue) */
.tvb-visibility-toggle.tvb-toggle-visible {
    border-color: #2271b1 !important;
    background: #f0f6fc !important;
}

.tvb-visibility-toggle.tvb-toggle-visible .dashicons {
    color: #2271b1;
}

/* Hidden state (eye-slash icon gray) */
.tvb-visibility-toggle.tvb-toggle-hidden {
    border-color: #ddd !important;
    background: #f6f7f7 !important;
}

.tvb-visibility-toggle.tvb-toggle-hidden .dashicons {
    color: #999;
}

.tvb-visibility-toggle:hover {
    border-color: #2271b1 !important;
    transform: scale(1.05);
}

/* =========================================
   SUCCESS CONFIRMATION MODAL
   ========================================= */

.tvb-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tvb-success-modal.active {
    opacity: 1;
    pointer-events: all;
}

.tvb-success-content {
    background: white;
    border-radius: 8px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tvb-success-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--tvb-red);
}

.tvb-success-header .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.tvb-success-header h3 {
    margin: 0;
    font-size: 24px;
}

.tvb-success-data {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 24px;
}

.tvb-success-data h4 {
    margin-top: 0;
    color: var(--tvb-red);
}

.tvb-success-data dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 0;
}

.tvb-success-data dt {
    font-weight: 600;
}

.tvb-success-data dd {
    margin: 0;
}

.tvb-success-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.tvb-success-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.tvb-success-btn-primary {
    background: var(--tvb-red);
    color: white;
}

.tvb-success-btn-primary:hover {
    background: var(--tvb-red-dark);
}

/* Verification Modal */
.tvb-verification-modal .tvb-verification-form {
    margin-top: 24px;
}

.tvb-verification-modal .tvb-form-field {
    margin-bottom: 20px;
}

.tvb-verification-modal .tvb-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.tvb-verification-pin-input {
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--tvb-red);
    border-radius: 4px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
    font-weight: bold;
    box-sizing: border-box;
}

.tvb-verification-pin-input:focus {
    outline: none;
    border-color: var(--tvb-red-dark);
    box-shadow: 0 0 0 3px rgba(190, 26, 42, 0.1);
}

.tvb-resend-verification {
    padding: 12px 24px;
    border: 2px solid var(--tvb-red);
    background: white;
    color: var(--tvb-red);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.tvb-resend-verification:hover {
    background: var(--tvb-red);
    color: white;
}

.tvb-resend-verification:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tvb-status-pending-verification {
    background: #ff9800;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
