/**
 * Public CSS for WooCommerce Product Inquiry Button
 *
 * @package    WooProductInquiryButton
 * @subpackage WooProductInquiryButton/assets/css
 */

/* Inquiry Button */
.wpib-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
}

.wpib-button:hover {
    background-color: #005177;
    color: #ffffff;
}

.wpib-button:focus {
    outline: none;
    box-shadow: 0 0 0 1px #fff, 0 0 0 3px #0073aa;
}

/* Add to Quote Cart button (premium) */
.wpib-add-to-quote-cart {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f9f9f9;
    color: #333333;
    border: 1px solid #d5d5d5;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 5px 10px 0;
}

.wpib-add-to-quote-cart:hover {
    background-color: #eeeeee;
    color: #333333;
}

/* Inquiry Form */
.wpib-inquiry-form-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
}

.wpib-inquiry-form-wrapper {
    max-width: 600px;
    margin: 40px auto;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wpib-inquiry-form-header {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpib-inquiry-form-header h3 {
    margin: 0;
    padding: 0;
    font-size: 18px;
    color: #333333;
}

.wpib-close-form {
    background: none;
    border: none;
    font-size: 24px;
    color: #999999;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.wpib-close-form:hover {
    color: #333333;
}

.wpib-inquiry-form {
    padding: 20px;
}

.wpib-form-field {
    margin-bottom: 20px;
}

.wpib-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333333;
}

.wpib-form-field .wpib-required {
    color: #ff0000;
}

.wpib-form-field input[type="text"],
.wpib-form-field input[type="email"],
.wpib-form-field input[type="tel"],
.wpib-form-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dddddd;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.wpib-form-field input[type="text"]:focus,
.wpib-form-field input[type="email"]:focus,
.wpib-form-field input[type="tel"]:focus,
.wpib-form-field textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

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

.wpib-form-field input.wpib-error,
.wpib-form-field textarea.wpib-error {
    border-color: #ff0000;
}

.wpib-form-submit {
    text-align: right;
    position: relative;
}

.wpib-submit-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpib-submit-button:hover {
    background-color: #005177;
}

.wpib-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: #0073aa;
    border-radius: 50%;
    vertical-align: middle;
    animation: wpib-spin 1s infinite linear;
}

@keyframes wpib-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.wpib-response-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 3px;
    font-size: 14px;
    display: none;
}

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

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

/* WhatsApp Button (premium) */
.wpib-whatsapp-option {
    margin-top: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.wpib-whatsapp-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #25d366;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpib-whatsapp-button:hover {
    background-color: #128c7e;
}

.wpib-whatsapp-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="white" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg>') center/contain no-repeat;
    vertical-align: middle;
    margin-right: 5px;
}

/* Quote Cart Counter (premium) */
.wpib-quote-cart-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0073aa;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    font-size: 14px;
    font-weight: 600;
    display: none;
    transition: all 0.3s ease;
}

.wpib-quote-cart-counter.has-items {
    display: block;
}

.wpib-quote-cart-link {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.wpib-quote-cart-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="white" d="M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/></svg>') center/contain no-repeat;
    margin-right: 10px;
}

.wpib-quote-cart-count {
    display: inline-block;
    background-color: #ffffff;
    color: #0073aa;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    margin-right: 8px;
}

/* Quote Cart Page (premium) */
.wpib-quote-cart-container {
    margin: 30px 0;
}

.wpib-quote-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.wpib-quote-cart-table th {
    background-color: #f9f9f9;
    text-align: left;
    padding: 10px 15px;
    border-bottom: 1px solid #dddddd;
}

.wpib-quote-cart-table td {
    padding: 15px;
    border-bottom: 1px solid #eeeeee;
    vertical-align: middle;
}

.wpib-remove-cart-item {
    background-color: #f9f9f9;
    color: #333333;
    border: 1px solid #dddddd;
    border-radius: 3px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpib-remove-cart-item:hover {
    background-color: #f2dede;
    color: #a94442;
    border-color: #ebccd1;
}

/* Hidden price (premium) */
.wpib-hidden-price {
    font-style: italic;
    color: #666666;
}

/* Cart message */
.wpib-cart-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 3px;
    font-size: 14px;
}

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

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

/* Responsive Styles */
@media (max-width: 768px) {
    .wpib-inquiry-form-wrapper {
        margin: 20px auto;
        max-width: 90%;
    }
    
    .wpib-inquiry-form-header {
        padding: 10px 15px;
    }
    
    .wpib-inquiry-form {
        padding: 15px;
    }
    
    .wpib-form-field {
        margin-bottom: 15px;
    }
    
    .wpib-form-field label {
        font-size: 14px;
    }
    
    .wpib-form-field input[type="text"],
    .wpib-form-field input[type="email"],
    .wpib-form-field input[type="tel"],
    .wpib-form-field textarea {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .wpib-form-field textarea {
        min-height: 100px;
    }
    
    .wpib-submit-button {
        width: 100%;
        padding: 10px 15px;
    }
    
    .wpib-whatsapp-button {
        width: 100%;
        padding: 10px 15px;
    }
    
    .wpib-quote-cart-counter {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .wpib-quote-cart-icon {
        width: 18px;
        height: 18px;
    }
    
    .wpib-quote-cart-count {
        width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 10px;
    }
    
    .wpib-quote-cart-text {
        font-size: 12px;
    }
    
    .wpib-quote-cart-table th,
    .wpib-quote-cart-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    .wpib-remove-cart-item {
        padding: 4px 8px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .wpib-inquiry-form-wrapper {
        margin: 10px auto;
    }
    
    .wpib-inquiry-form-header h3 {
        font-size: 16px;
    }
    
    .wpib-quote-cart-table {
        display: block;
        overflow-x: auto;
    }
    
    .wpib-quote-cart-counter {
        padding: 6px 10px;
    }
    
    .wpib-quote-cart-text {
        display: none;
    }
    
    .wpib-quote-cart-count {
        margin-right: 0;
    }
    
    .wpib-button,
    .wpib-add-to-quote-cart {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}