/* QR Authentication Plugin - Frontend Styles - ZPHC Style */

/* Container */
.qr-auth-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.qr-auth-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

/* Header */
.qr-header {
    text-align: center;
    margin-bottom: 40px;
}

.qr-auth-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qr-auth-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Instructions */
.qr-instructions {
    margin-bottom: 40px;
}

.qr-instruction-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.qr-instruction-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.qr-step-number {
    display: inline-block;
    background: #0891b2;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.qr-step-text {
    font-size: 16px;
    color: #1a1a1a;
    margin: 8px 0;
    line-height: 1.6;
}

.qr-step-description {
    font-size: 14px;
    color: #666;
    margin: 8px 0 0 0;
    line-height: 1.6;
}

/* Form */
.qr-auth-form {
    max-width: 600px;
    margin: 0 auto;
}

.qr-form-group {
    margin-bottom: 24px;
}

.qr-code-label {
    display: block;
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
    text-align: left;
    font-weight: 500;
}

/* Digit Boxes */
.qr-code-boxes {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.qr-digit-box {
    width: 60px;
    height: 70px;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.qr-digit-box:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.qr-digit-space {
    margin-left: 12px;
}

/* Phone Label */
.qr-phone-label {
    display: block;
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
    text-align: left;
    font-weight: 500;
}

/* Phone Input */
.qr-phone-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.qr-phone-input:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Old code input - keep for compatibility */
.qr-code-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s;
    box-sizing: border-box;
    text-align: center;
    font-weight: 500;
    letter-spacing: 2px;
}

.qr-code-input:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Terms */
.qr-terms-group {
    margin-bottom: 24px;
}

.qr-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    cursor: pointer;
}

.qr-terms-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.qr-terms-label a {
    color: #0891b2;
    text-decoration: none;
}

.qr-terms-label a:hover {
    text-decoration: underline;
}

/* Alerts */
.qr-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.qr-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.qr-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}

/* Submit Button */
.qr-submit-wrapper {
    text-align: center;
}

.qr-submit-btn {
    min-width: 200px;
    padding: 14px 40px;
    background: #0891b2;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.qr-submit-btn:hover {
    background: #0e7490;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(8, 145, 178, 0.4);
}

.qr-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.qr-btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Support Text */
.qr-support-text {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: #666;
}

.qr-support-text a {
    color: #0891b2;
    text-decoration: none;
    font-weight: 500;
}

.qr-support-text a:hover {
    text-decoration: underline;
}

/* Result Page Styles */
.qr-result-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.qr-result-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 32px;
}

.qr-success-icon {
    text-align: center;
    margin-bottom: 24px;
}

.qr-result-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.qr-result-subtitle {
    font-size: 14px;
    text-align: center;
    color: #6b7280;
    margin: 0 0 32px 0;
}

.qr-product-details {
    margin: 32px 0;
}

.qr-product-image {
    text-align: center;
    margin-bottom: 24px;
}

.qr-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.qr-product-info {
    text-align: center;
}

.qr-product-name {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.qr-product-description {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 24px;
}

.qr-verification-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 16px;
}

.qr-code-label {
    font-size: 14px;
    color: #6b7280;
}

.qr-code-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    font-family: 'Courier New', monospace;
}

.qr-verification-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.qr-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.qr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.qr-btn-primary {
    background: linear-gradient(135deg, #C9A961 0%, #B8974D 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.qr-btn-primary:hover {
    background: linear-gradient(135deg, #D4B56E 0%, #C9A961 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(201, 169, 97, 0.4);
}

.qr-btn-secondary {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.qr-btn-secondary:hover {
    background: #f9fafb;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 640px) {
    .qr-auth-container,
    .qr-result-container {
        padding: 16px;
    }
    
    .qr-auth-card,
    .qr-result-card {
        padding: 24px 20px;
    }
    
    .qr-auth-title {
        font-size: 24px;
    }
    
    .qr-result-actions {
        flex-direction: column;
    }
    
    .qr-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .qr-result-actions {
        display: none;
    }
}
