/* ===== QR Scanner - Modern Dark Design ===== */
.cc-scan-wrap {
    max-width: 500px;
    margin: 30px auto;
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: center;
}

/* === Login Section === */
.cc-scan-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.cc-scan-login-card {
    background: #fff;
    padding: 40px 35px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
}

.cc-scan-login-icon {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.cc-scan-login-card h2 {
    color: #1a1a2e;
    font-size: 22px;
    margin-bottom: 8px;
}

.cc-scan-login-desc {
    color: #888;
    font-size: 14px;
    margin-bottom: 25px;
}

.cc-scan-field {
    margin-bottom: 15px;
}

.cc-scan-field input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: Tahoma;
    direction: rtl;
    transition: border-color 0.3s;
}

.cc-scan-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.cc-scan-login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    font-family: Tahoma;
    transition: opacity 0.2s;
}

.cc-scan-login-btn:hover {
    opacity: 0.9;
}

.cc-scan-login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Login error message - separate from scan result error */
.cc-scan-login-error {
    margin-top: 15px;
    padding: 12px;
    background: #ffe0e0;
    color: #c00;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

/* === Scanner Header === */
.cc-scan-header {
    margin-bottom: 20px;
}

.cc-scan-header h2 {
    font-size: 26px;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.cc-scan-header p {
    color: #888;
    font-size: 14px;
}

/* === Scanner Box === */
.cc-scanner-box {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px;
    padding: 25px;
    min-height: 380px;
    position: relative;
    box-shadow: 0 15px 40px rgba(26,26,46,0.3);
}

.cc-qr-reader {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
}

/* Camera Error */
.cc-camera-error {
    padding: 60px 20px;
    text-align: center;
    color: #fff;
}

.cc-camera-error svg {
    margin-bottom: 15px;
    opacity: 0.6;
}

.cc-camera-error p {
    font-size: 16px;
    margin-bottom: 5px;
}

.cc-camera-hint {
    font-size: 13px !important;
    opacity: 0.6;
}

/* === Scan Results (inside dark scanner box) === */
.cc-scan-result,
.cc-scan-result-error {
    padding: 30px 20px;
    display: none;
    flex-direction: column;
    align-items: center;
}

.cc-icon-success,
.cc-icon-error {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    animation: cc-pulse 0.6s ease-out;
}

.cc-icon-success {
    background: linear-gradient(135deg, #00c853, #69f0ae);
    box-shadow: 0 5px 20px rgba(0,200,83,0.3);
}

.cc-icon-error {
    background: linear-gradient(135deg, #ff1744, #ff5252);
    box-shadow: 0 5px 20px rgba(255,23,68,0.3);
}

.cc-result-name,
.cc-error-name {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.cc-result-status {
    font-size: 16px;
    font-weight: bold;
}

.cc-status-success {
    color: #69f0ae;
}

.cc-error-status {
    font-size: 15px;
    color: #ff5252;
}

/* === Manual Entry === */
.cc-manual-entry {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cc-manual-entry p {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin-bottom: 10px;
}

.cc-manual-entry form {
    display: flex;
    gap: 8px;
}

.cc-manual-entry input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    direction: ltr;
}

.cc-manual-entry input::placeholder {
    color: rgba(255,255,255,0.3);
}

.cc-manual-entry input:focus {
    outline: none;
    border-color: #667eea;
}

.cc-manual-entry button {
    padding: 10px 20px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: Tahoma;
    cursor: pointer;
    font-size: 14px;
}

.cc-manual-entry button:hover {
    background: #5a6fd6;
}

/* === Info Bar === */
.cc-scan-info {
    margin-top: 20px;
    padding: 14px 18px;
    background: #f5f7ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cc-scan-info span {
    font-size: 13px;
    color: #666;
}

/* === File Upload QR Fallback === */
.cc-file-scan-entry {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cc-file-scan-entry p {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin-bottom: 10px;
}

.cc-file-scan-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(102,126,234,0.15);
    border: 1px dashed rgba(102,126,234,0.5);
    border-radius: 8px;
    color: #667eea;
    font-family: Tahoma;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.cc-file-scan-label:hover {
    background: rgba(102,126,234,0.25);
    border-color: #667eea;
}

/* === Logout Button === */
.cc-scan-logout {
    margin-top: 15px;
}

.cc-logout-btn {
    padding: 8px 20px;
    background: none;
    border: 2px solid #ddd;
    border-radius: 8px;
    color: #999;
    font-family: Tahoma;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.cc-logout-btn:hover {
    border-color: #ff5252;
    color: #ff5252;
}

/* Animations */
@keyframes cc-pulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Override html5-qrcode library styles */
#cc-qr-reader video {
    border-radius: 12px !important;
}

#cc-qr-reader img {
    border-radius: 12px !important;
}

#cc-qr-reader__scan_region {
    min-height: 250px;
}

#cc-qr-reader__dashboard {
    padding-top: 10px;
}

#cc-qr-reader__dashboard_section_csr button {
    background: #667eea !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    color: #fff !important;
    font-family: Tahoma !important;
}

/* === VIP/Lunch Badges (for dark scanner background) === */
.cc-scan-badges,
.cc-scan-badges-error {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 4px 0;
    flex-wrap: wrap;
}
.cc-scan-badges .cc-badge-vip,
.cc-scan-badges .cc-badge-lunch,
.cc-scan-badges-error .cc-badge-vip,
.cc-scan-badges-error .cc-badge-lunch {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin: 1px;
}
.cc-scan-badges .cc-badge-vip.yes,
.cc-scan-badges-error .cc-badge-vip.yes { background: #69f0ae; color: #1a1a2e; }
.cc-scan-badges .cc-badge-vip.no,
.cc-scan-badges-error .cc-badge-vip.no { background: #ff5252; color: #fff; }
.cc-scan-badges .cc-badge-lunch.yes,
.cc-scan-badges-error .cc-badge-lunch.yes { background: #69f0ae; color: #1a1a2e; }
.cc-scan-badges .cc-badge-lunch.no,
.cc-scan-badges-error .cc-badge-lunch.no { background: #ff5252; color: #fff; }

/* Also support for non-dark contexts */
.cc-badge-vip, .cc-badge-lunch {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin: 2px;
}
.cc-badge-vip.yes { background: #00c853; color: #fff; }
.cc-badge-vip.no { background: #ff1744; color: #fff; }
.cc-badge-lunch.yes { background: #00c853; color: #fff; }
.cc-badge-lunch.no { background: #ff1744; color: #fff; }

/* === BIG VIP/Lunch Status Rows (operator emphasis — all 4 combos) === */
.cc-scan-badges,
.cc-scan-badges-error {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 10px auto 8px;
}
.cc-status-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.cc-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border-radius: 14px;
    font-family: Tahoma;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    border: 2px solid rgba(255,255,255,0.4);
    animation: cc-pulse 0.35s ease-out;
}
.cc-status-row svg {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.cc-status-row .cc-status-label {
    flex: 1;
    text-align: right;
}
.cc-status-row .cc-status-value {
    font-size: 24px;
    letter-spacing: 0.5px;
}
.cc-status-row.yes {
    background: linear-gradient(135deg, #00c853, #009624);
}
.cc-status-row.no {
    background: linear-gradient(135deg, #ff1744, #c62828);
}
