/* Join Auction Styles */

/* R1 (navbar fixed) + R3 (no scrollbar shift): page scrolls on the viewport
   so the sticky navbar stays; stable gutter stops field jump. */
html {
    scrollbar-gutter: stable;
}

/* Page owns its base look (was inherited from dashboard.css / create-auction.css). */
body {
    background-color: #f4f7fc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    overflow-x: clip;
    background-image: none !important;
}

/* R5: page owns its layout wrappers (were .dashboard-scope / .main-content). */
.join-auction-scope {
    font-family: 'Poppins', sans-serif;
}
.join-auction-main {
    flex-grow: 1;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("../../img/i1.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.15; /* Subtly dim in light mode so it doesn't overpower */
}

[data-theme="dark"] body {
    background-color: var(--color-bg);
    color: var(--color-text);
    background-image: none !important;
}

[data-theme="dark"] body::before {
    /* Magic filter logic from organizer dashboard for the perfect glowing neon look */
    filter: invert(1) hue-rotate(185deg) brightness(0.92) contrast(1.05);
    opacity: 0.35; /* Perfect opacity to blend with the #000000 base background */
}


.join-container {
    width: 100%;
}

.or-divider {
    position: relative;
    text-align: center;
    margin: 32px 0;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--color-border);
    z-index: 1;
}

.or-divider span {
    position: relative;
    background-color: var(--color-surface);
    padding: 0 16px;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
}

.scan-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    background-color: var(--color-primary-soft);
    color: var(--color-primary);
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-transform: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scan-btn:hover {
    background-color: #e0e7ff; /* Deeper light blue for hover */
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--color-primary-glow);
}

[data-theme="dark"] .scan-btn:hover {
    background-color: rgba(96, 165, 250, 0.2); /* Light blue tint for dark mode hover */
}

/* Empty State Animation (Optional) */
.empty-state {
    animation: fadeIn 0.4s ease-out;
}

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

/* QR Code Modal Styles (MUI style) */
.scan-modal-content {
    width: 400px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 32px;
    background: var(--color-surface);
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-border);
    position: relative;
}

[data-theme="dark"] .scan-modal-content {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.scan-modal-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.scan-viewport {
    position: relative;
    width: 280px;
    height: 280px;
    max-width: 78vw;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    background: #0b1220;
    border: 1px solid var(--color-border);
}

.scan-viewport video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scan-frame {
    position: absolute;
    inset: 26px;
    border-radius: 12px;
    box-shadow: 0 0 0 2000px rgba(11, 18, 32, .35);
    pointer-events: none;
    overflow: hidden;
}
.scan-frame::before,
.scan-frame::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 3px solid #22d3ee;
}
.scan-frame::before { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.scan-frame::after { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee, transparent);
    box-shadow: 0 0 10px 1px rgba(34, 211, 238, .6);
    animation: scan-move 2.2s ease-in-out infinite;
}
@keyframes scan-move {
    0% { top: 4%; }
    50% { top: 96%; }
    100% { top: 4%; }
}

.scan-status {
    color: var(--color-text-muted);
    text-align: center;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
    min-height: 20px;
}

.go-btn {
    padding: 16px;
    font-size: 16px;
}

@media (max-width: 480px) {
    .scan-btn {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 12px;
    }
    
    .scan-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .go-btn {
        padding: 12px;
        font-size: 14px;
        border-radius: 12px;
    }
}

/* page-owned override: translucent setup card so the page background shows through (R5) */
.setup-card {
    background: #ffffff85;
}
