/* Custom styles for Request Quote section to match checkout styling */

.rq-wc-quote-section {
    max-width: 400px;
    margin: 20px auto;
    padding: 0;
    background: #fff;
    border-radius: 12px;
    font-family: inherit;
    border: 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.rq-wc-quote-section:hover {
    box-shadow: 0 25px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.rq-wc-quote-section .rq-wc-quote-content {
    padding: 32px;
}

.rq-wc-quote-section h3,
.rq-wc-quote-section h4 {
    color: #1e293b; /* Slate-900 */
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 24px;
    text-align: center;
    line-height: 1.2;
}

.rq-wc-quote-section label {
    color: #272525; /* Theme's $black */
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.rq-wc-quote-section input[type="number"],
.rq-wc-quote-section input[type="text"],
.rq-wc-quote-section input[type="email"],
.rq-wc-quote-section textarea,
.rq-wc-quote-section select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0; /* Theme's $form-border */
    border-radius: 0; /* Theme style */
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s ease;
    height: 44px; /* Match theme button height */
    line-height: 1.4;
    font-weight: 400;
    margin-bottom: 20px;
}

.rq-wc-quote-section textarea {
    height: auto;
    min-height: 80px;
    line-height: 1.6;
    resize: vertical;
}

.rq-wc-quote-section input[type="number"]:focus,
.rq-wc-quote-section input[type="text"]:focus,
.rq-wc-quote-section input[type="email"]:focus,
.rq-wc-quote-section textarea:focus,
.rq-wc-quote-section select:focus {
    border-color: #5a5958; /* Accent color on focus */
    outline: none;
}

.rq-wc-quote-section .rq-wc-add-to-quote,
.rq-wc-quote-section .rq-wc-view-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 56px; /* py-4 equivalent */
    line-height: 1;
    background: #5a5958; /* Theme's accent color */
    color: #fff;
    padding: 0 25px;
    font-size: 18px;
    font-weight: 500;
    border: 0;
    outline: 0;
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none;
    margin: 0;
    transform: scale(1);
}

.rq-wc-quote-section .rq-wc-add-to-quote:hover,
.rq-wc-quote-section .rq-wc-view-quote:hover {
    background: #4a4847; /* Darker on hover */
    color: #fff;
    text-decoration: none;
    transform: scale(1.02);
}

.rq-wc-quote-section .rq-wc-add-to-quote:active,
.rq-wc-quote-section .rq-wc-view-quote:active {
    transform: scale(0.98);
}

.rq-wc-quote-section .rq-wc-add-to-quote .icon,
.rq-wc-quote-section .rq-wc-view-quote .icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: currentColor;
}

.rq-wc-quote-section .rq-wc-add-to-quote:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.rq-wc-quote-section .rq-wc-added-to-quote {
    background: #f9bc7d; /* Theme's accent2 color */
    color: #272525;
}

.rq-wc-quote-section .rq-wc-added-to-quote:hover {
    background: #f9bc7d;
    color: #272525;
}

.rq-wc-quote-section .form-row {
    margin-bottom: 15px;
}

.rq-wc-quote-section .woocommerce-error,
.rq-wc-quote-section .woocommerce-message,
.rq-wc-quote-section .woocommerce-info {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-left: 4px solid;
    border-radius: 3px;
}

.rq-wc-quote-section .woocommerce-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #f5c6cb;
}

.rq-wc-quote-section .woocommerce-message {
    background: #d4edda;
    color: #155724;
    border-left-color: #c3e6cb;
}

.rq-wc-quote-section .woocommerce-info {
    background: #cce7ff;
    color: #004085;
    border-left-color: #b8daff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rq-wc-quote-section {
        padding: 15px;
        margin: 15px 0;
    }
}

/* Integration with WooCommerce single product page */
.woocommerce div.product .rq-wc-quote-section {
    border: none;
    background: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Quantity stepper styling */
.rq-wc-quote-section .rq-wc-quantity-wrapper {
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rq-wc-quote-section .rq-wc-quantity-stepper {
    display: flex;
    align-items: center;
    background: #f1f5f9; /* Slate-100 */
    border-radius: 8px;
    padding: 4px;
}

.rq-wc-quote-section .qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.rq-wc-quote-section .qty-btn:hover {
    background: #fff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.rq-wc-quote-section .qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rq-wc-quote-section .qty-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 40px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b; /* Slate-900 */
}

.rq-wc-quote-section .qty,
.rq-wc-quote-section #rq-wc-product-quantity {
    display: none; /* Hide the actual input, we'll use the stepper */
}

.rq-wc-quote-section .rq-wc-quote-buttons {
    margin-top: 24px;
}

@media (max-width: 768px) {
    .rq-wc-quote-section {
        max-width: none;
        margin: 15px;
        border-radius: 8px;
    }
    
    .rq-wc-quote-section .rq-wc-quote-content {
        padding: 24px;
    }
}

/* Loading state */
.rq-wc-quote-section .rq-wc-add-to-quote.loading {
    position: relative;
    color: transparent;
}

.rq-wc-quote-section .rq-wc-add-to-quote.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Simplified quote button styling for direct form approach */
.rq-wc-quote-button-wrapper .button {
    display: inline-block;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 44px;
    line-height: 44px;
    background: #5a5958; /* Theme's accent color */
    color: #fff;
    padding: 0 25px;
    max-width: 100%;
    font-size: 14px;
    font-weight: 500;
    border: 0;
    outline: 0;
    position: relative;
    cursor: pointer;
    border-radius: 0; /* Theme style */
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.104, 0.204, 0.492, 1); /* Theme transition */
    text-decoration: none;
    width: 100%;
}

.rq-wc-quote-button-wrapper .button:hover {
    background: #272525; /* Theme's $black on hover */
    color: #fff;
    text-decoration: none;
}

/* Shop page specific styling */
.woocommerce .products .product .rq-wc-quote-button-wrapper {
    margin-top: 10px;
}

.woocommerce .products .product .rq-wc-quote-button-wrapper .button {
    width: 100%;
    text-align: center;
}
