/*
Theme Name: Huanuo Boiler Theme
Author: Huanuo
Description: Industrial Boiler Manufacturer Theme - Based on Yosin Design
Version: 1.0
Text Domain: huanuo
*/

/* reCAPTCHA + Submit 并排布局 */
.captcha-submit-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    margin-top: 20px !important;
    flex-wrap: wrap !important;
}

.captcha-submit-row .wpcf7-form-control-wrap,
.captcha-submit-row p {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
}

/* Submit Button - 蓝色圆角按钮 */
.captcha-submit-row .submit-btn,
.wpcf7 .captcha-submit-row input[type="submit"].submit-btn {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 1rem !important;
    background-color: #2563eb !important;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: white !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    min-width: 160px !important;
    text-align: center !important;
    line-height: 1.5 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
}

.captcha-submit-row .submit-btn:hover,
.wpcf7 .captcha-submit-row input[type="submit"].submit-btn:hover {
    transform: translateY(-2px) !important;
    background-color: #1d4ed8 !important;
    box-shadow: 0 15px 25px -3px rgba(0,0,0,0.15) !important;
}

.captcha-submit-row .submit-btn:active,
.wpcf7 .captcha-submit-row input[type="submit"].submit-btn:active {
    transform: translateY(0) !important;
    background-color: #1e40af !important;
}

/* CF7 spinner compatibility */
.captcha-submit-row .submit-btn.has-spinner {
    position: relative;
}

.captcha-submit-row .submit-btn .wpcf7-spinner {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    background: rgba(255,255,255,0.3);
}

@media (max-width: 640px) {
    .captcha-submit-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .captcha-submit-row .submit-btn,
    .wpcf7 .captcha-submit-row input[type="submit"].submit-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Product description table styles */
.pro-info table,
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.pro-info table th,
.prose table th {
    background-color: #f8f8f8;
    font-weight: 600;
    text-align: left;
    padding: 12px;
    border: 1px solid #ddd;
}

.pro-info table td,
.prose table td {
    padding: 12px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.pro-info table tr:nth-child(even),
.prose table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.pro-info table tr:hover,
.prose table tr:hover {
    background-color: #f0f0f0;
}

/* AliDataTable specific styles */
.aliDataTable {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.aliDataTable td {
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.aliDataTable td:first-child {
    background-color: #f8f8f8;
    font-weight: 600;
    width: 30%;
}

/* Responsive tables */
@media (max-width: 768px) {
    .pro-info table,
    .prose table,
    .aliDataTable {
        font-size: 12px;
    }
    
    .pro-info table td,
    .prose table td,
    .aliDataTable td {
        padding: 8px;
    }
}

/* Improved table styles for product specifications */
table,
.pro-info table,
.prose table,
.aliDataTable {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 15px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

table thead,
.pro-info table thead,
.prose table thead,
.aliDataTable thead {
    background: linear-gradient(135deg, #0B3A6E 0%, #123F76 100%);
    color: #ffffff;
}

table th,
.pro-info table th,
.prose table th,
.aliDataTable th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

table td,
.pro-info table td,
.prose table td,
.aliDataTable td {
    padding: 14px 20px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    line-height: 1.6;
}

table td:first-child,
.pro-info table td:first-child,
.prose table td:first-child,
.aliDataTable td:first-child {
    font-weight: 600;
    color: #0B3A6E;
    background-color: #f8fafc;
    width: 35%;
}

table tr:last-child td,
.pro-info table tr:last-child td,
.prose table tr:last-child td,
.aliDataTable tr:last-child td {
    border-bottom: none;
}

table tr:nth-child(even),
.pro-info table tr:nth-child(even),
.prose table tr:nth-child(even),
.aliDataTable tr:nth-child(even) {
    background-color: #f9fafb;
}

table tr:hover,
.pro-info table tr:hover,
.prose table tr:hover,
.aliDataTable tr:hover {
    background-color: #eff6ff;
    transition: background-color 0.2s ease;
}

/* Remove nested div styling in table cells */
table td div,
.aliDataTable td div {
    margin: 0;
    padding: 0;
}

/* Responsive tables */
@media (max-width: 768px) {
    table,
    .pro-info table,
    .prose table,
    .aliDataTable {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    table th,
    .pro-info table th,
    .prose table th,
    .aliDataTable th,
    table td,
    .pro-info table td,
    .prose table td,
    .aliDataTable td {
        padding: 10px 12px;
    }
    
    table td:first-child,
    .pro-info table td:first-child,
    .prose table td:first-child,
    .aliDataTable td:first-child {
        width: auto;
    }
}

/* Product info section styling */
.pro-info {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin: 20px 0;
}

.pro-info h2,
.pro-info h3,
.pro-info h4 {
    color: #0B3A6E;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.pro-info p {
    line-height: 1.8;
    color: #374151;
    margin-bottom: 16px;
}

/* Product description images */
.pro-info img,
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Contact Form 7 Styles */
.wpcf7-form {
    max-width: 100%;
}

.wpcf7-form p {
    margin-bottom: 20px;
}

.wpcf7-form label {
    display: block;
    font-weight: 600;
    color: #0B3A6E;
    margin-bottom: 8px;
    font-size: 14px;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: #0B3A6E;
    box-shadow: 0 0 0 3px rgba(11, 58, 110, 0.1);
    background-color: #f8fafc;
}

.wpcf7-form input[type="text"]::placeholder,
.wpcf7-form input[type="email"]::placeholder,
.wpcf7-form input[type="tel"]::placeholder,
.wpcf7-form textarea::placeholder {
    color: #9ca3af;
}

.wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0B3A6E 0%, #123F76 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(11, 58, 110, 0.3);
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
    background: linear-gradient(135deg, #123F76 0%, #0B3A6E 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 58, 110, 0.4);
}

.wpcf7-form input[type="submit"]:active,
.wpcf7-form .wpcf7-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(11, 58, 110, 0.3);
}

/* Form validation messages */
.wpcf7-form .wpcf7-not-valid-tip {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

.wpcf7-form .wpcf7-response-output {
    margin: 20px 0;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok {
    background-color: #d1fae5;
    border: 2px solid #10b981;
    color: #065f46;
}

.wpcf7-form .wpcf7-response-output.wpcf7-validation-errors,
.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ng {
    background-color: #fee2e2;
    border: 2px solid #ef4444;
    color: #991b1b;
}

/* Required field indicator */
.wpcf7-form .wpcf7-validates-as-required {
    border-left: 3px solid #0B3A6E;
}

/* Spinner */
.wpcf7-form .ajax-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top-color: #0B3A6E;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Responsive form */
@media (max-width: 768px) {
    .wpcf7-form input[type="text"],
    .wpcf7-form input[type="email"],
    .wpcf7-form input[type="tel"],
    .wpcf7-form textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .wpcf7-form input[type="submit"],
    .wpcf7-form .wpcf7-submit {
        width: 100%;
        padding: 14px 24px;
    }
}

/* Contact Form 7 - Improved Styles */
.wpcf7 {
    width: 100%;
}

.wpcf7-form {
    width: 100%;
}

.wpcf7-form p {
    margin: 0;
    padding: 0;
}

.wpcf7-form br {
    display: block;
    margin-bottom: 16px;
    content: "";
}

.wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 16px;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    display: block;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: #0B3A6E;
    box-shadow: 0 0 0 3px rgba(11, 58, 110, 0.1);
    background-color: #f8fafc;
}

.wpcf7-form input[type="text"]::placeholder,
.wpcf7-form input[type="email"]::placeholder,
.wpcf7-form input[type="tel"]::placeholder,
.wpcf7-form textarea::placeholder {
    color: #9ca3af;
}

.wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0B3A6E 0%, #123F76 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(11, 58, 110, 0.3);
    margin-top: 10px;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
    background: linear-gradient(135deg, #123F76 0%, #0B3A6E 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 58, 110, 0.4);
}

.wpcf7-form input[type="submit"]:active,
.wpcf7-form .wpcf7-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(11, 58, 110, 0.3);
}

/* Form validation messages */
.wpcf7-form .wpcf7-not-valid-tip {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

.wpcf7-form .wpcf7-response-output {
    margin: 20px 0;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok {
    background-color: #d1fae5;
    border: 2px solid #10b981;
    color: #065f46;
}

.wpcf7-form .wpcf7-response-output.wpcf7-validation-errors,
.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ng {
    background-color: #fee2e2;
    border: 2px solid #ef4444;
    color: #991b1b;
}

/* Required field indicator */
.wpcf7-form .wpcf7-validates-as-required {
    border-left: 3px solid #0B3A6E;
}

/* Spinner */
.wpcf7-form .ajax-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top-color: #0B3A6E;
    border-radius: 50%;
    animation: wpcf7-spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes wpcf7-spin {
    to { transform: rotate(360deg); }
}

/* Responsive form */
@media (max-width: 768px) {
    .wpcf7-form input[type="text"],
    .wpcf7-form input[type="email"],
    .wpcf7-form input[type="tel"],
    .wpcf7-form textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .wpcf7-form input[type="submit"],
    .wpcf7-form .wpcf7-submit {
        width: 100%;
        padding: 14px 24px;
    }
}

/* Force Contact Form 7 Styles with !important */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    background-color: #ffffff !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    display: block !important;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form textarea:focus {
    outline: none !important;
    border-color: #0B3A6E !important;
    box-shadow: 0 0 0 3px rgba(11, 58, 110, 0.1) !important;
    background-color: #f8fafc !important;
}

.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit {
    display: inline-block !important;
    padding: 14px 32px !important;
    background: linear-gradient(135deg, #0B3A6E 0%, #123F76 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(11, 58, 110, 0.3) !important;
    margin-top: 10px !important;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
    background: linear-gradient(135deg, #123F76 0%, #0B3A6E 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(11, 58, 110, 0.4) !important;
}

.wpcf7-form-control-wrap {
    display: block !important;
    margin-bottom: 16px !important;
}

.wpcf7-form br {
    display: block !important;
    margin-bottom: 16px !important;
    content: "" !important;
}

/* Product Detail Page - Center Images Only */
.woocommerce-product-details__short-description img,
.woocommerce-product-detail__description img,
.product-description img,
.entry-content img,
.woocommerce div.product .woocommerce-product-details__short-description img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Keep tables and text left-aligned */
.woocommerce-product-details__short-description table,
.woocommerce-product-detail__description table,
.product-description table,
.entry-content table {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.woocommerce-product-details__short-description p,
.woocommerce-product-detail__description p,
.product-description p,
.entry-content p {
    text-align: left !important;
}

/* Product Detail Page - Center Images in Product Info */
.pro-info .prose img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Keep tables left-aligned */
.pro-info .prose table {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Keep text left-aligned */
.pro-info .prose p {
    text-align: left !important;
}

/* Center figure elements if present */
.pro-info .prose figure {
    margin-left: auto !important;
    margin-right: auto !important;
}
