/**
 * Wings Auto Quote - Frontend Inquiry Styles
 *
 * Modern, clean, WoodMart-compatible styles for the inquiry cart page.
 *
 * @package Wings_Auto_Quote
 */

/* =============================================
   1. INQUIRY FORM WRAPPER
   ============================================= */
.waq-inquiry-form-wrapper {
    max-width: 720px;
    margin: 40px auto 60px;
    padding: 35px 40px 40px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.waq-inquiry-heading {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
    padding: 0;
    letter-spacing: -0.3px;
}

.waq-inquiry-subheading {
    font-size: 15px;
    color: #777;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* =============================================
   2. FORM ELEMENTS
   ============================================= */
.waq-inquiry-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
}

.waq-form-row {
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
}

.waq-form-row-full {
    flex: 1 1 100%;
}

.waq-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.waq-form-row label:after {
    display: none;
}

.waq-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.25s ease;
    box-sizing: border-box;
    outline: none;
    line-height: 1.4;
}

.waq-input:focus {
    background: #ffffff;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.08);
}

.waq-input::placeholder {
    color: #aaa;
    opacity: 1;
}

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

/* Error state */
.waq-input.waq-input-error {
    border-color: #e53935;
    background: #fff5f5;
}

.waq-input-error:focus {
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

/* =============================================
   3. ACTION BUTTONS
   ============================================= */
.waq-form-actions {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
}

.waq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    line-height: 1.3;
    min-height: 50px;
    position: relative;
    overflow: hidden;
}

.waq-btn:focus {
    outline: 3px solid rgba(229, 57, 53, 0.3);
    outline-offset: 2px;
}

.waq-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.waq-btn-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* WhatsApp Button - Red primary */
.waq-btn-whatsapp {
    background: #e53935;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(229, 57, 53, 0.3);
}

.waq-btn-whatsapp:hover {
    background: #c62828;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
}

.waq-btn-whatsapp:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
}

/* Email Button */
.waq-btn-email {
    background: #1a1a2e;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(26, 26, 46, 0.25);
}

.waq-btn-email:hover {
    background: #0f0f1e;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 26, 46, 0.35);
}

.waq-btn-email:active {
    transform: translateY(0);
}

/* Loading spinner */
.waq-btn .waq-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: waq-spin 0.6s linear infinite;
}

.waq-btn.is-loading .waq-btn-text {
    visibility: hidden;
}

.waq-btn.is-loading .waq-spinner {
    display: block;
    position: absolute;
}

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

/* =============================================
   4. FORM RESPONSE MESSAGES
   ============================================= */
.waq-form-response {
    flex: 1 1 100%;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    display: none;
}

.waq-form-response.waq-response-success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.waq-form-response.waq-response-error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* =============================================
   5. THANK YOU MESSAGE
   ============================================= */
.waq-thank-you {
    text-align: center;
    padding: 50px 30px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.waq-thank-you-icon {
    margin-bottom: 20px;
}

.waq-thank-you-icon svg {
    width: 64px;
    height: 64px;
}

.waq-thank-you-message {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.5;
}

/* =============================================
   6. CART TABLE MODIFICATIONS
   ============================================= */
.woocommerce-cart-form {
    margin-bottom: 20px;
}

.woocommerce-cart-form .shop_table {
    border: 1px solid #e8e8e8 !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.woocommerce-cart-form .shop_table th {
    background: #f8f9fa !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    padding: 14px 16px !important;
}

.woocommerce-cart-form .shop_table td {
    padding: 16px !important;
    vertical-align: middle;
}

/* Product image in cart */
.woocommerce-cart-form .product-thumbnail img {
    width: 80px !important;
    border-radius: 6px;
    border: 1px solid #eee;
}

/* Quantity input styling */
.woocommerce-cart-form .quantity .qty {
    width: 70px;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    background: #f8f9fa;
}

.woocommerce-cart-form .quantity .qty:focus {
    border-color: #1a1a2e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.08);
}

/* Remove button */
.woocommerce-cart-form .product-remove .remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffebee;
    color: #e53935 !important;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.2s ease;
    text-decoration: none;
}

.woocommerce-cart-form .product-remove .remove:hover {
    background: #e53935;
    color: #ffffff !important;
}

/* Cart totals - hide on inquiry */
.cart-collaterals {
    display: none !important;
}

/* Hide coupon */
.cart-form .coupon {
    display: none !important;
}

/* Update cart button */
.woocommerce-cart-form .actions .button {
    background: #1a1a2e !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    border: none !important;
}

.woocommerce-cart-form .actions .button:hover {
    background: #0f0f1e !important;
}

/* Hide price column */
.woocommerce-cart-form .product-price,
.woocommerce-cart-form .product-subtotal {
    display: none;
}

/* =============================================
   7. RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
    .waq-inquiry-form-wrapper {
        padding: 25px 20px 30px;
        margin: 20px 0;
        border-radius: 8px;
    }

    .waq-inquiry-heading {
        font-size: 22px;
    }

    .waq-form-row {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .waq-form-actions {
        flex-direction: column;
    }

    .waq-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 15px;
        min-height: 48px;
    }

    .waq-thank-you {
        padding: 30px 20px;
    }

    .waq-thank-you-message {
        font-size: 17px;
    }

    /* Cart table responsive */
    .woocommerce-cart-form .shop_table {
        font-size: 14px;
    }

    .woocommerce-cart-form .shop_table th {
        font-size: 12px !important;
        padding: 10px 8px !important;
    }

    .woocommerce-cart-form .shop_table td {
        padding: 10px 8px !important;
    }

    .woocommerce-cart-form .product-thumbnail img {
        width: 60px !important;
    }
}

@media (max-width: 480px) {
    .waq-inquiry-form-wrapper {
        padding: 20px 16px 24px;
    }

    .waq-inquiry-heading {
        font-size: 19px;
    }

    .waq-inquiry-subheading {
        font-size: 14px;
    }

    .waq-input {
        padding: 11px 14px;
        font-size: 14px;
    }

    .waq-btn {
        font-size: 14px;
        padding: 12px 20px;
        min-height: 44px;
    }

    /* Cart table - stacked on mobile */
    .woocommerce-cart-form .shop_table tbody tr {
        display: flex;
        flex-wrap: wrap;
        padding: 12px;
        border-bottom: 1px solid #e8e8e8;
    }

    .woocommerce-cart-form .shop_table tbody tr td {
        border: none;
        padding: 6px !important;
    }

    .woocommerce-cart-form .shop_table tbody tr td.product-thumbnail {
        width: 80px;
        order: 0;
    }

    .woocommerce-cart-form .shop_table tbody tr td.product-name {
        flex: 1;
        order: 1;
        padding-left: 12px !important;
    }

    .woocommerce-cart-form .shop_table tbody tr td.product-quantity {
        order: 2;
        width: auto;
    }

    .woocommerce-cart-form .shop_table tbody tr td.product-remove {
        order: 3;
        width: auto;
    }

    .woocommerce-cart-form .shop_table thead {
        display: none;
    }
}

/* =============================================
   8. PRINT STYLES
   ============================================= */
@media print {
    .waq-inquiry-form-wrapper {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .waq-btn {
        display: none;
    }
}

/* =============================================
   9. TOAST NOTIFICATIONS
   ============================================= */
.waq-toast-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 420px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.waq-toast-visible {
    transform: translateX(0);
}

.waq-toast-hiding {
    transform: translateX(120%);
}

.waq-toast-success {
    background: linear-gradient(135deg, #25D366, #1da851);
}

.waq-toast-error {
    background: linear-gradient(135deg, #e53935, #c62828);
}

.waq-toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.waq-toast-text {
    flex: 1;
}

/* =============================================
   10. INLINE FIELD ERRORS
   ============================================= */
.waq-field-error {
    display: none;
    font-size: 12px;
    font-weight: 500;
    color: #e53935;
    margin-top: 4px;
    line-height: 1.4;
}

/* =============================================
   11. MINI CART FRAGMENT
   ============================================= */
.waq-mini-cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.waq-mini-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.waq-mini-cart-item-img img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.waq-mini-cart-item-details {
    flex: 1;
    min-width: 0;
}

.waq-mini-cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.waq-mini-cart-item-name a {
    color: #333;
    text-decoration: none;
}

.waq-mini-cart-item-name a:hover {
    color: #e53935;
}

.waq-mini-cart-item-sku {
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}

.waq-mini-cart-item-qty {
    font-size: 12px;
    color: #666;
}

.waq-mini-cart-item-remove a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 18px;
    color: #999;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.2s;
}

.waq-mini-cart-item-remove a:hover {
    color: #e53935;
    background: rgba(229, 57, 53, 0.1);
}

.waq-mini-cart-empty {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

.waq-mini-cart-footer {
    padding: 16px;
    border-top: 1px solid #eee;
    text-align: center;
}

.waq-mini-cart-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #e53935;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.waq-mini-cart-btn:hover {
    background: #c62828;
}

/* =============================================
   12. ADD TO INQUIRY BUTTON (WoodMart)
   ============================================= */
.single_add_to_cart_button,
.product_type_simple.add_to_cart_button,
.product_type_variable.add_to_cart_button,
.product_type_grouped.add_to_cart_button {
    min-width: 160px;
}

/* WoodMart quick view button styling */
.product-grid-item .waq-add-to-inquiry,
.product-grid-item .add_to_cart_button {
    width: 100% !important;
    justify-content: center !important;
}

/* =============================================
   13. UTILITY
   ============================================= */
.waq-clearfix::after {
    content: '';
    display: table;
    clear: both;
}

.waq-screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* =============================================
   14. RESPONSIVE TOAST
   ============================================= */
@media (max-width: 768px) {
    .waq-toast-notification {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        font-size: 13px;
        padding: 14px 18px;
    }
}

@media (max-width: 480px) {
    .waq-toast-notification {
        padding: 12px 16px;
        font-size: 12px;
    }
}