/**
 * Event Check-in System - Frontend Styles
 *
 * @package Event_Checkin_System
 * @version 1.0.0 Build 010
 * @author Ayonto UG | ayonto.de
 */

.ecs-checkin-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ecs-checkin-header {
    text-align: center;
    margin-bottom: 30px;
}

.ecs-checkin-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Search Section */
.ecs-search-section {
    margin-bottom: 25px;
}

.ecs-search-form {
    display: flex;
    gap: 10px;
}

.ecs-search-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.ecs-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ecs-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ecs-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.ecs-search-btn:active {
    transform: translateY(0);
}

.ecs-search-btn svg {
    flex-shrink: 0;
}

/* Search Status */
.ecs-search-status {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.ecs-search-status.loading {
    background: #f1f5f9;
    color: #64748b;
}

.ecs-search-status.error {
    background: #fef2f2;
    color: #dc2626;
}

.ecs-search-status.success {
    background: #f0fdf4;
    color: #16a34a;
}

/* Result Card */
.ecs-result-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ecs-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.ecs-match-info {
    font-size: 13px;
    color: #64748b;
}

.ecs-match-info .match-exact {
    color: #16a34a;
    font-weight: 600;
}

.ecs-match-info .match-fuzzy {
    color: #f59e0b;
    font-weight: 600;
}

.ecs-ticket-type {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Result Body */
.ecs-result-body {
    padding: 25px;
}

.ecs-person-info {
    margin-bottom: 20px;
}

.ecs-person-name {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.ecs-person-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ecs-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #64748b;
}

.ecs-detail-item svg {
    color: #94a3b8;
    flex-shrink: 0;
}

.ecs-detail-item strong {
    color: #334155;
}

/* Additional Info */
.ecs-additional-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
}

.ecs-additional-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.ecs-additional-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.ecs-additional-item:last-child {
    border-bottom: none;
}

.ecs-additional-label {
    color: #64748b;
}

.ecs-additional-value {
    color: #1e293b;
    font-weight: 500;
}

/* Facebook Section */
.ecs-facebook-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.ecs-facebook-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.ecs-required {
    color: #dc2626;
}

.ecs-facebook-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.ecs-facebook-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ecs-facebook-input.has-value {
    border-color: #22c55e;
}

/* Result Footer */
.ecs-result-footer {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.ecs-checkin-status {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.ecs-checkin-status.already-checked {
    background: #fef3c7;
    color: #92400e;
}

.ecs-checkin-status.checked-success {
    background: #dcfce7;
    color: #166534;
}

.ecs-actions {
    display: flex;
    gap: 12px;
}

.ecs-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.ecs-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.ecs-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.ecs-btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.ecs-btn-secondary {
    color: #334155;
    background: #fff;
    border: 2px solid #e2e8f0;
}

.ecs-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Suggestions */
.ecs-suggestions-section {
    margin-top: 15px;
    padding: 16px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
}

.ecs-suggestions-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 12px 0;
}

.ecs-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ecs-suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 10px;
}

.ecs-suggestion-item:hover {
    background: #fef3c7;
}

.ecs-suggestion-name {
    font-weight: 600;
    color: #1e293b;
    flex-shrink: 0;
}

.ecs-suggestion-detail {
    font-size: 13px;
    color: #64748b;
    text-align: right;
    word-break: break-all;
    min-width: 0;
}

/* Success Overlay */
.ecs-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ecs-success-content {
    background: #fff;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ecs-success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.ecs-success-icon svg {
    color: #fff;
}

.ecs-success-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.ecs-success-content p {
    font-size: 18px;
    color: #64748b;
    margin: 0 0 25px 0;
}

/* Loading State */
.ecs-loading {
    position: relative;
    pointer-events: none;
}

.ecs-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media screen and (max-width: 600px) {
    .ecs-checkin-container {
        padding: 20px 15px;
    }
    
    .ecs-search-form {
        flex-direction: column;
    }
    
    .ecs-search-btn {
        justify-content: center;
    }
    
    .ecs-result-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .ecs-actions {
        flex-direction: column;
    }
    
    .ecs-person-name {
        font-size: 20px;
    }
    
    .ecs-success-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    /* Suggestions Mobile-Optimierung (Build 007) */
    .ecs-suggestions-section {
        margin-top: 12px;
        padding: 14px;
    }
    
    .ecs-suggestion-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 14px;
    }
    
    .ecs-suggestion-name {
        font-size: 15px;
    }
    
    .ecs-suggestion-detail {
        text-align: left;
        font-size: 12px;
        color: #94a3b8;
        word-break: break-all;
    }
}

/* ==========================================================================
   WhatsApp-Consent Badges (Build 002)
   ========================================================================== */

.ecs-whatsapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
}

.ecs-whatsapp-badge svg {
    flex-shrink: 0;
}

.ecs-whatsapp-yes {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.ecs-whatsapp-yes svg {
    stroke: #22c55e;
}

.ecs-whatsapp-no {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.ecs-whatsapp-no svg {
    stroke: #94a3b8;
}

/* ==========================================================================
   Ticket-Kategorie Badges (Build 003)
   ========================================================================== */

.ecs-category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
}

.ecs-category-player {
    background-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.ecs-category-not-player {
    background-color: rgba(220, 38, 38, 0.9);
    color: #fff;
}

/* Nicht-Spieler Warnung */
.ecs-checkin-status.not-player-ticket {
    background: #fef2f2;
    border: 2px solid #fecaca;
    padding: 0;
}

.ecs-not-player-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: #dc2626;
}

.ecs-not-player-warning svg {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.ecs-not-player-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.ecs-not-player-text strong {
    font-size: 15px;
    color: #b91c1c;
}

/* Ticket-Type bei Nicht-Spieler */
.ecs-ticket-type.ecs-ticket-not-player {
    background-color: #94a3b8 !important;
    opacity: 0.8;
}

/* Blockierter Check-in Button */
.ecs-btn-primary.ecs-btn-blocked {
    background: #94a3b8 !important;
    cursor: not-allowed;
}

/* ==========================================================================
   Login-Formular Styles (Build 004)
   ========================================================================== */

.ecs-login-section {
    max-width: 400px;
    margin: 0 auto;
}

.ecs-login-subtitle {
    color: #64748b;
    font-size: 15px;
    text-align: center;
    margin-top: 5px;
}

.ecs-login-form {
    margin-top: 25px;
}

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

.ecs-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.ecs-form-group label svg {
    color: #64748b;
}

.ecs-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.ecs-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ecs-login-status {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.ecs-login-status.loading {
    background: #f1f5f9;
    color: #64748b;
}

.ecs-login-status.error {
    background: #fef2f2;
    color: #dc2626;
}

.ecs-login-status.success {
    background: #f0fdf4;
    color: #16a34a;
}

/* Remember Me Checkbox */
.ecs-remember-me-group {
    margin-bottom: 25px;
}

.ecs-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 400 !important;
    user-select: none;
}

.ecs-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ecs-checkbox-custom {
    position: relative;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
}

.ecs-checkbox:checked + .ecs-checkbox-custom {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
}

.ecs-checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.ecs-checkbox:checked + .ecs-checkbox-custom::after {
    display: block;
}

.ecs-checkbox-text {
    font-size: 14px;
    color: #475569;
}

.ecs-checkbox:focus + .ecs-checkbox-custom {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.ecs-btn-login {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
}

/* User Bar */
.ecs-user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 15px;
}

.ecs-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #334155;
}

.ecs-user-info svg {
    color: #64748b;
}

.ecs-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.ecs-logout-btn:hover {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.ecs-logout-btn svg {
    color: inherit;
}

/* Honeypot-Feld (für Fallback ohne WP-Armor) */
.ecs-hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}
