/* Modern Check-in Feedback Popup CSS */

.check-in-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.check-in-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.check-in-popup-content {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.check-in-popup-overlay.active .check-in-popup-content {
    transform: scale(1) translateY(0);
}

.check-in-popup-content.check-in-access-card {
    width: min(94vw, 860px);
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.25rem;
    text-align: initial;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 18px;
}

.check-in-popup-content.check-in-access-card.success {
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(16, 185, 129, 0.18);
}

.check-in-popup-content.check-in-access-card.error {
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(239, 68, 68, 0.18);
}

.check-in-popup-x {
    position: absolute;
    top: 0.875rem;
    inset-inline-end: 0.875rem;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.check-in-popup-x:hover {
    background: rgba(15, 23, 42, 0.12);
}

.check-in-access-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-inline-end: 2.75rem;
    margin-bottom: 1rem;
}

.check-in-state-pill,
.check-in-access-time {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.check-in-state-pill {
    padding: 0.45rem 0.75rem;
}

.check-in-state-pill.is-success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.check-in-state-pill.is-error {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.check-in-access-time {
    color: #64748b;
}

.check-in-access-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 23, 42, 0.03));
    border: 1px solid rgba(226, 232, 240, 0.9);
    margin-bottom: 1rem;
}

.check-in-access-avatar {
    width: 92px;
    height: 92px;
    border-radius: 12px;
    background: #e2e8f0;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.check-in-access-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.check-in-access-avatar-fallback,
.member-photo-lg-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
    color: #2563eb;
    font-weight: 900;
}

.check-in-access-avatar-fallback {
    font-size: 2rem;
}

.member-photo-lg-fallback {
    font-size: 2.5rem;
}

.check-in-access-avatar.is-fallback .check-in-access-photo,
.member-photo-lg-avatar.is-fallback .member-photo-lg {
    display: none;
}

.check-in-access-avatar.is-fallback .check-in-access-avatar-fallback,
.member-photo-lg-avatar.is-fallback .member-photo-lg-fallback {
    display: flex;
}

.check-in-access-member {
    min-width: 0;
}

.check-in-access-kicker {
    margin: 0 0 0.25rem;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 800;
}

.check-in-access-member h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.2;
}

.check-in-access-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.check-in-access-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
}

.check-in-access-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.check-in-access-field,
.check-in-access-notes {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.9);
    padding: 0.75rem;
    min-width: 0;
}

.check-in-access-field span,
.check-in-access-notes span {
    display: block;
    margin-bottom: 0.35rem;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
}

.check-in-access-field strong {
    display: block;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.check-in-access-field strong.is-success {
    color: #047857;
}

.check-in-access-field strong.is-danger {
    color: #dc2626;
}

.check-in-access-notes {
    margin-top: 0.6rem;
}

.check-in-access-notes p {
    margin: 0;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.6;
}

.check-in-access-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.check-in-access-btn {
    min-height: 2.85rem;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.check-in-access-btn.is-muted {
    background: #f1f5f9;
    color: #334155;
}

.check-in-access-btn.is-primary {
    background: #2563eb;
    color: #fff;
}

.check-in-access-btn.is-dark {
    background: #0f172a;
    color: #fff;
}

.check-in-access-btn.is-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.check-in-access-btn:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
}

[data-bs-theme="dark"] .check-in-popup-content.check-in-access-card {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(71, 85, 105, 0.7);
}

[data-bs-theme="dark"] .check-in-popup-x {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

[data-bs-theme="dark"] .check-in-access-hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.5));
    border-color: rgba(71, 85, 105, 0.7);
}

[data-bs-theme="dark"] .check-in-access-member h2,
[data-bs-theme="dark"] .check-in-access-field strong {
    color: #f8fafc;
}

[data-bs-theme="dark"] .check-in-access-meta span,
[data-bs-theme="dark"] .check-in-access-field,
[data-bs-theme="dark"] .check-in-access-notes {
    background: rgba(30, 41, 59, 0.86);
    border-color: rgba(71, 85, 105, 0.75);
}

[data-bs-theme="dark"] .check-in-access-notes p {
    color: #cbd5e1;
}

@media (max-width: 767.98px) {
    .check-in-popup-content.check-in-access-card {
        width: calc(100vw - 1rem);
        padding: 1rem;
        border-radius: 12px;
    }

    .check-in-access-topline,
    .check-in-access-hero {
        align-items: flex-start;
    }

    .check-in-access-hero {
        flex-direction: column;
    }

    .check-in-access-grid,
    .check-in-access-actions {
        grid-template-columns: 1fr;
    }

    .check-in-access-avatar {
        width: 82px;
        height: 82px;
    }

    .check-in-access-member h2 {
        font-size: 1.35rem;
    }
}

/* Success State Background Glow */
.check-in-popup-content.success {
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.1), 0 0 0 1px rgba(16, 185, 129, 0.2);
}

/* Error State Background Glow */
.check-in-popup-content.error {
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.1), 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.popup-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    animation: icon-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes icon-pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.success .popup-icon-wrapper {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.error .popup-icon-wrapper {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.member-photo-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.member-photo-lg-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 4px solid var(--glass-bg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.success .popup-title { color: #059669; }
.error .popup-title { color: #dc2626; }

.member-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.member-id {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.6;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.popup-details {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    text-align: left;
}

[data-bs-theme="dark"] .popup-details {
    background: rgba(255, 255, 255, 0.03);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    opacity: 0.7;
}

.detail-value {
    font-weight: 700;
}

.btn-close-popup {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-close-popup:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.error .btn-close-popup {
    background: #ef4444;
}

.error .btn-close-popup:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* RTL Support */
[dir="rtl"] .popup-details {
    text-align: right;
}

/* Confetti-like success animation */
.success-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}
