/**
 * QR Scanner Module - Styles
 * File: assets/css/qr-scanner.css
 */

/* Content wrapper */
.vp-qr-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 20px;
}

/* Mode selector */
.vp-mode-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
}

.vp-mode-btn {
    flex: 1;
    max-width: 280px;
    padding: 16px 32px;
    font-size: 1.1em;
    border: 2px solid #1FD18E;
    background: white;
    color: #6b7280;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.vp-mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 209, 142, 0.2);
    border-color: #1FD18E;
}

.vp-mode-btn.active {
    background: #1FD18E;
    color: white;
    border-color: #1FD18E;
    box-shadow: 0 4px 16px rgba(31, 209, 142, 0.3);
}

/* Scanner sections */
.vp-scanner-section {
    display: none;
}

.vp-scanner-section.active {
    display: block;
}

/* Video container */
.vp-video-container {
    position: relative;
    width: 100%;
    max-height: 450px;
    margin: 0 auto 20px;
    border-radius: 5px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#vp-video {
    width: 100%;
    display: block;
}

#vp-canvas {
    display: none;
}

/* Scan overlay */
.vp-scan-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    border: 3px solid #1FD18E;
    border-radius: 20px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    animation: vp-pulse 2s ease-in-out infinite;
}

@keyframes vp-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.vp-scan-overlay::before,
.vp-scan-overlay::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 4px solid #1FD18E;
}

.vp-scan-overlay::before {
    top: -4px;
    left: -4px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 20px;
}

.vp-scan-overlay::after {
    bottom: -4px;
    right: -4px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 20px;
}

/* Upload area */
.vp-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 5px;
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafb;
    margin: 0 auto;
}

.vp-upload-area:hover {
    background: #f0f9ff;
    border-color: #1FD18E;
    border-style: solid;
}

.vp-upload-area.dragover {
    background: #e8fff8;
    border-color: #1FD18E;
    border-style: solid;
    transform: scale(1.02);
}

.vp-upload-icon {
    font-size: 4.5em;
    margin-bottom: 24px;
    opacity: 0.7;
}

.vp-upload-area h3 {
    font-size: 1.6em;
    margin-bottom: 12px;
    color: #1f2937;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.vp-upload-area p {
    color: #6b7280;
    font-size: 1.1em;
}

/* Controls */
.vp-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 24px;
}

.vp-btn {
    padding: 14px 36px;
    font-size: 1.05em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.vp-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.vp-btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Status messages */
.vp-status {
    text-align: center;
    margin-top: 24px;
    font-size: 1.05em;
    color: #6b7280;
    min-height: 32px;
    font-weight: 500;
}

.vp-status.scanning {
    color: #1FD18E;
    font-weight: 600;
}

.vp-status.error {
    color: #ef4444;
    font-weight: 600;
}

/* Result container */
.vp-result-container {
    margin-top: 40px;
    padding: 28px;
    background: linear-gradient(135deg, #f0fdf8 0%, #ecfdf5 100%);
    border-radius: 20px;
    border: 2px solid #1FD18E;
    display: none;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 24px rgba(31, 209, 142, 0.15);
}

.vp-result-container.show {
    display: block;
    animation: vp-slideIn 0.4s ease;
}

@keyframes vp-slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vp-result-container h3 {
    color: #059669;
    margin-bottom: 16px;
    font-size: 1.4em;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.vp-result-text {
    background: white;
    padding: 20px;
    border-radius: 12px;
    word-break: break-all;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    color: #374151;
    border-left: 4px solid #1FD18E;
    line-height: 1.7;
}

/* Responsive design */
@media (max-width: 768px) {
    .vp-qr-content {
        padding: 24px 16px;
    }

    .vp-mode-selector {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 32px;
    }

    .vp-mode-btn {
        max-width: 100%;
        padding: 14px 24px;
        font-size: 1em;
    }

    .vp-scan-overlay {
        width: 200px;
        height: 200px;
    }

    .vp-upload-area {
        padding: 60px 24px;
        border-radius: 16px;
    }

    .vp-upload-icon {
        font-size: 3.5em;
    }

    .vp-upload-area h3 {
        font-size: 1.3em;
    }

    .vp-upload-area p {
        font-size: 1em;
    }

    .vp-controls {
        flex-direction: column;
    }

    .vp-btn {
        width: 100%;
    }

    .vp-result-container {
        padding: 24px;
        margin-top: 32px;
    }

    .vp-result-container h3 {
        font-size: 1.2em;
    }

    .vp-result-text {
        font-size: 0.9em;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .vp-qr-content {
        padding: 20px 12px;
    }

    .vp-scan-overlay {
        width: 180px;
        height: 180px;
    }

    .vp-upload-area {
        padding: 50px 20px;
    }

    .vp-status {
        font-size: 0.95em;
    }
}