/**
 * Quanta Verify - Frontend Styles
 */

/* Reset and Base */
.qv-verify-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.qv-verify-wrapper * {
    box-sizing: border-box;
}

.qv-verify-container {
    max-width: 500px;
    margin: 0 auto;
}

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

.qv-logo {
    max-height: 60px;
    margin-bottom: 15px;
}

.qv-company-name {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.qv-tagline {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Form Section */
.qv-form-section {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
    text-align: center;
}

.qv-shield-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--qv-primary) 0%, var(--qv-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(0,166,81,0.3);
}

.qv-shield-icon svg {
    width: 35px;
    height: 35px;
    color: #fff;
}

.qv-form-section h2 {
    color: #1a1a2e;
    font-size: 24px;
    margin: 0 0 10px 0;
}

.qv-instruction {
    color: #666;
    margin: 0 0 25px 0;
    font-size: 15px;
    line-height: 1.5;
}

/* Input Group */
.qv-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.qv-input-group input {
    flex: 1;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.qv-input-group input:focus {
    border-color: var(--qv-primary);
    box-shadow: 0 0 0 4px rgba(0,166,81,0.1);
}

.qv-input-group input::placeholder {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: #aaa;
}

.qv-input-group button {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--qv-primary) 0%, var(--qv-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.qv-input-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,166,81,0.3);
}

.qv-input-group button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.qv-code-hint {
    color: #999;
    font-size: 13px;
    margin: 0;
}

/* Spinner */
.qv-spinner {
    width: 24px;
    height: 24px;
    animation: qv-spin 1s linear infinite;
}

@keyframes qv-spin {
    100% { transform: rotate(360deg); }
}

/* Result Section */
.qv-result-section {
    animation: qv-fadeIn 0.5s ease;
}

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

.qv-result {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
    text-align: center;
}

.qv-result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.qv-result-icon svg {
    width: 45px;
    height: 45px;
}

.qv-result-success .qv-result-icon {
    background: linear-gradient(135deg, #00a651 0%, #00c853 100%);
    box-shadow: 0 10px 30px rgba(0,166,81,0.3);
}

.qv-result-success .qv-result-icon svg {
    color: #fff;
}

.qv-result-failure .qv-result-icon {
    background: linear-gradient(135deg, #dc3545 0%, #ff4757 100%);
    box-shadow: 0 10px 30px rgba(220,53,69,0.3);
}

.qv-result-failure .qv-result-icon svg {
    color: #fff;
}

.qv-result-title {
    font-size: 26px;
    margin: 0 0 10px 0;
    color: #1a1a2e;
}

.qv-result-success .qv-result-title {
    color: #00a651;
}

.qv-result-failure .qv-result-title {
    color: #dc3545;
}

.qv-result-message {
    color: #666;
    font-size: 15px;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Scan Info */
.qv-scan-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.qv-scan-info.qv-first-scan {
    background: #e8f5e9;
    color: #2e7d32;
}

.qv-scan-info.qv-repeat-scan {
    background: #fff8e1;
    color: #f57f17;
}

/* Product Details */
.qv-product-details {
    text-align: left;
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 25px;
}

.qv-product-image {
    width: 100%;
    max-width: 200px;
    border-radius: 10px;
    margin: 0 auto 20px;
    display: block;
}

.qv-product-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 5px 0;
    text-align: center;
}

.qv-product-dose {
    font-size: 16px;
    color: #666;
    margin: 0 0 20px 0;
    text-align: center;
}

.qv-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.qv-detail-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
}

.qv-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 4px;
}

.qv-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.qv-product-description {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Certificate Section */
.qv-certificate-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.qv-certificate-section h3 {
    font-size: 16px;
    margin: 0 0 15px 0;
    color: #1a1a2e;
}

.qv-certificate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.qv-certificate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(34,113,177,0.3);
    color: #fff;
}

/* Warning Box */
.qv-warning-box {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 20px;
    border-radius: 0 10px 10px 0;
    text-align: left;
    margin-top: 20px;
}

.qv-warning-box h4 {
    margin: 0 0 10px 0;
    color: #f57f17;
}

.qv-warning-box p {
    margin: 0 0 10px 0;
    color: #666;
}

.qv-warning-box ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.qv-warning-box li {
    margin-bottom: 5px;
}

/* Verify Another Button */
.qv-verify-another {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qv-verify-another:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.qv-verify-another svg {
    fill: #fff;
}

/* Footer */
.qv-footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

.qv-footer p {
    margin: 5px 0;
}

.qv-footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.qv-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 500px) {
    .qv-verify-wrapper {
        padding: 20px 15px;
    }
    
    .qv-form-section,
    .qv-result {
        padding: 30px 20px;
    }
    
    .qv-input-group {
        flex-direction: column;
    }
    
    .qv-input-group button {
        width: 100%;
    }
    
    .qv-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Simplified Product Name Display */
.qv-verified-product-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 15px 0;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    border-left: 4px solid #00a651;
}

/* Coming Soon Section */
.qv-coming-soon {
    margin-top: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px dashed #ddd;
}

.qv-coming-soon p {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* ===== EMBED MODE STYLES ===== */
/* For use with [quanta_verify mode="embed"] in Elementor */

.qv-embed-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.qv-embed-wrapper * {
    box-sizing: border-box;
}

/* Form Layout */
.qv-embed-form-inner {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.qv-embed-form-inner input {
    flex: 1;
    padding: 18px 24px;
    font-size: 16px;
    background: #6b6b6b;
    border: none;
    border-radius: 8px;
    color: #fff;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qv-embed-form-inner input::placeholder {
    color: rgba(255,255,255,0.5);
    text-transform: none;
    letter-spacing: 0;
}

.qv-embed-form-inner input:focus {
    background: #7a7a7a;
}

/* Gradient Button - Pink to Cyan */
.qv-embed-form-inner button {
    padding: 18px 40px;
    background: linear-gradient(135deg, #e84393 0%, #00d2d3 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.qv-embed-form-inner button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(232, 67, 147, 0.4);
}

.qv-embed-form-inner button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.qv-embed-wrapper .qv-spinner {
    animation: qv-spin 1s linear infinite;
}

@keyframes qv-spin {
    100% { transform: rotate(360deg); }
}

/* Result States */
.qv-embed-result {
    text-align: center;
    padding: 40px 20px;
    animation: qv-fadeUp 0.4s ease;
}

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

/* Success State */
.qv-embed-success-icon {
    color: #00d26a;
    margin-bottom: 20px;
}

.qv-embed-success-title {
    font-size: 32px;
    font-weight: 800;
    color: #00d26a;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.qv-embed-product-name {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
    padding: 12px 20px;
    background: rgba(0, 210, 106, 0.15);
    border-radius: 8px;
    display: inline-block;
}

.qv-embed-success-msg {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
}

.qv-embed-scan-info {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 25px;
    padding: 10px 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    display: inline-block;
}

.qv-embed-scan-info.first-scan {
    color: #00d26a;
    background: rgba(0, 210, 106, 0.1);
}

.qv-embed-scan-info.repeat-scan {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

/* Failure State */
.qv-embed-failure-icon {
    color: #ff4757;
    margin-bottom: 20px;
}

.qv-embed-failure-title {
    font-size: 32px;
    font-weight: 800;
    color: #ff4757;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.qv-embed-failure-msg {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Try Again Button */
.qv-embed-again {
    padding: 14px 30px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qv-embed-again:hover {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.05);
}

/* Mobile */
@media (max-width: 500px) {
    .qv-embed-form-inner {
        flex-direction: column;
    }
    
    .qv-embed-form-inner button {
        width: 100%;
    }
    
    .qv-embed-success-title,
    .qv-embed-failure-title {
        font-size: 24px;
        letter-spacing: 2px;
    }
}
