/* /css/qr-scanner.css */
.kbank-scanner-container {
    display: flex;
    justify-content: center;
    padding: 16px;
}

.kbank-scan-btn {
    background-color: #00855B;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 133, 91, 0.2);
    transition: all 0.3s ease;
}

.kbank-scan-btn:hover {
    background-color: #006B49;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 133, 91, 0.3);
}

.scan-icon {
    margin-bottom: 4px;
}

.scan-text {
    font-size: 12px;
    display: none;
}

/* Modal Styles */
.kbank-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.kbank-modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.kbank-modal.active .kbank-modal-content {
    transform: translateY(0);
}

.kbank-modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    position: sticky;
    top: 0;
}

.kbank-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #00855B;
}

.kbank-modal-body {
    padding: 20px;
}

#qr-reader {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: none;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f8f8;
}

#qr-reader video {
    border-radius: 12px;
    object-fit: cover;
}

.scan-result {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: #F5F9FF;
    border: 1px solid #E0E0E0;
}

.scan-result.success {
    background: #E8F5E9;
    border-color: #A5D6A7;
}

.scan-result.error {
    background: #FFEBEE;
    border-color: #FFCDD2;
}

/* Hide HTML5QR Code elements */
.qr-reader__dashboard_section_csr {
    display: none !important;
}

@media (min-width: 768px) {
    .kbank-scan-btn {
        width: auto;
        height: auto;
        border-radius: 8px;
        padding: 12px 24px;
        flex-direction: row;
    }
    
    .scan-icon {
        margin: 0 8px 0 0;
    }
    
    .scan-text {
        display: block;
    }
    
    .kbank-modal-content {
        position: relative;
        max-width: 600px;
        margin: 40px auto;
        border-radius: 20px;
    }
}