/* Bulk Query Button Styles */

/* Button Styling */
.bulk-query-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #333;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bulk-query-button:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

.bulk-query-button svg {
    transition: transform 0.3s ease;
}

.bulk-query-button:hover svg {
    transform: scale(1.1);
}

/* Responsive button layout */
@media (max-width: 767px) {
    .bulk-query-button {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Modal Styles */
.bulk-query-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bulk-query-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 40px;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bulk-query-modal h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.modal-subtitle {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 14px;
}

.bulk-query-close {
    color: #aaa;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.bulk-query-close:hover,
.bulk-query-close:focus {
    color: #000;
}

/* Form Styles */
.bulk-query-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group .required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-bulk-query {
    width: 100%;
    padding: 15px 30px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-bulk-query:hover {
    background-color: #000;
    transform: translateY(-2px);
}

.submit-bulk-query:active {
    transform: translateY(0);
}

.submit-bulk-query:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.button-loader {
    display: inline-block;
}

/* Form Messages */
.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .bulk-query-modal-content {
        margin: 10% auto;
        padding: 30px 20px;
        width: 95%;
    }
    
    .bulk-query-modal h2 {
        font-size: 24px;
    }
    
    .bulk-query-close {
        top: 15px;
        right: 15px;
        font-size: 28px;
    }
}

/* Compatibility with XStore theme */
.single-product .product .cart .bulk-query-button {
    vertical-align: middle;
}

/* Ensure button appears on same row on desktop */
@media (min-width: 768px) {
    .single-product .product .cart {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .single-product .product .cart .quantity {
        margin-right: 10px;
    }
    
    .single-product .product .cart .single_add_to_cart_button {
        margin-right: 10px;
    }
}
