/* ========================================
   CONTACT FORM 7 - BẢO HÀNH CSS
   ======================================== */

/* Container */
.bao-hanh-cf7-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.page-header-cf7 {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.page-header-cf7 h2 {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-header-cf7 p {
    color: #555;
    margin: 8px 0;
    font-size: 15px;
}

.highlight-cf7 {
    color: #e74c3c !important;
    font-weight: bold !important;
    font-size: 16px !important;
    margin-top: 15px !important;
}

/* Form Sections */
.form-section-cf7 {
    background: #f8f9fa;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.section-title-cf7 {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Labels */
.bao-hanh-cf7-container label {
    display: block;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

/* Inputs */
.cf7-input,
.cf7-textarea,
.cf7-select {
    width: 100% !important;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    margin-top: 5px;
    box-sizing: border-box;
}

.cf7-input:focus,
.cf7-textarea:focus,
.cf7-select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cf7-textarea {
    min-height: 80px;
    resize: vertical;
}

/* QR Button */
.input-with-qr-cf7 {
    position: relative;
    display: block;
}

.qr-icon-btn-cf7 {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    z-index: 10;
}

.qr-icon-btn-cf7:hover {
    background: #5568d3;
    transform: translateY(-50%) scale(1.05);
}

.qr-icon-btn-cf7 svg {
    display: block;
    width: 20px;
    height: 20px;
}

.input-with-qr-cf7 input {
    padding-right: 55px !important;
}

/* Submit Button */
.btn-submit-cf7 {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.btn-submit-cf7:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit-cf7:active {
    transform: translateY(0);
}

/* Scanner Modal */
.scanner-modal-cf7 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.scanner-modal-cf7.active {
    display: flex !important;
}

.scanner-content-cf7 {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.scanner-content-cf7 h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 24px;
}

.scanner-content-cf7 p {
    color: #666;
    margin-bottom: 20px;
}

#qrPreviewCF7 {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    border: 3px solid #667eea;
    margin: 0 auto 20px;
    display: block;
    background: #000;
}

.scan-status-cf7 {
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    margin: 15px 0;
    font-weight: 600;
    color: #667eea;
}

.scan-status-cf7.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.scan-status-cf7.checking {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.close-scanner-cf7 {
    padding: 12px 30px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-scanner-cf7:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* Messages */
.wpcf7-response-output {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
}

.wpcf7-mail-sent-ok {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    color: #155724;
}

.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    color: #856404;
}

.wpcf7-mail-sent-ng,
.wpcf7-aborted {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
}

/* Validation Errors */
.wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 13px;
    display: block;
    margin-top: 5px;
    font-weight: normal;
}

span.wpcf7-not-valid {
    border-color: #e74c3c !important;
}

/* Loading Spinner */
.wpcf7-spinner {
    margin-left: 10px;
    display: inline-block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bao-hanh-cf7-container {
        padding: 20px;
        margin: 20px 10px;
    }

    .page-header-cf7 h2 {
        font-size: 22px;
    }

    .form-section-cf7 {
        padding: 15px;
    }

    .scanner-content-cf7 {
        width: 95%;
        padding: 20px;
    }

    #qrPreviewCF7 {
        max-width: 100%;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bao-hanh-cf7-container {
    animation: fadeIn 0.5s ease;
}