@import "./sl-quote-icon.css";

/* General button styles */
.single_add_to_cart_button,
.sl_single_add_to_cart_button {
    color: var(--btn-color-hover, #3E3E3E);
    background-color: var(--btn-bgcolor-hover, #e0e0e0);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    display: inline-block;
    margin-top: 10px; /* Adjust margin as needed */
    margin-right: 0;
    margin-left: var(--button-spacing, 5px);
    box-sizing: border-box; /* Ensure padding is included in the width */
    min-width: 150px; /* Minimum width for desktop */
    width: auto; /* Default width for desktop */
}

.single_add_to_cart_button:hover,
.sl_single_add_to_cart_button:hover{
    background-color: var(--btn-bgcolor-hover, #e0e0e0);
}

/* Ensure buttons are aligned correctly next to the quantity field */
.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart .sl_single_add_to_cart_button {
    margin-right: 0px;
}

/* Responsive adjustments for general products */
@media (max-width: 768px) {
    .woocommerce div.product form.cart {
        display: flex;
        flex-direction: column;
    }
    .woocommerce div.product form.cart .button,
    .woocommerce div.product form.cart .single_add_to_cart_button,
    .woocommerce div.product form.cart .sl_single_add_to_cart_button {
        width: 80%; /* Full width on mobile */
        margin-right: 0;
        margin-bottom: 10px; /* Add some space between buttons */
    }
}

/* Additional responsive adjustments for variation products */
@media (max-width: 768px) {
    .woocommerce-variation-add-to-cart {
        display: flex;
        flex-direction: column;
    }
    .woocommerce-variation-add-to-cart .button,
    .woocommerce-variation-add-to-cart .single_add_to_cart_button,
    .woocommerce-variation-add-to-cart .sl_single_add_to_cart_button{
        width: 80%; /* Full width on mobile */
        margin-right: 0;
        margin-bottom: 10px; /* Add some space between buttons */
    }
}



/* Add this CSS to your main stylesheet */
@keyframes quote-added {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.quote-added-animation {
    animation: quote-added 1.5s ease-in-out;
}

/* classes for the quote list form */

.d-flex {
        display: flex;
        gap: 8px;
    }

.flex-item {
        flex: 1;
    }

.sl-quote-quantity-input {
    width: 100px !important;    /* Or whatever size you prefer */
    max-width: 120px;
    min-width: 60px;
    text-align: right;
    /* You can also add padding if you like */
}

.sl-quote-quantity-input::-webkit-inner-spin-button,
.sl-quote-quantity-input::-webkit-outer-spin-button {
    opacity: 1 !important;
    pointer-events: auto !important;
}

 .sl_register_buttons {
     margin-top: 20px;
     display: flex;
     align-items: center;
     justify-content: flex-end;
 }
.sl_register_buttons label {
    margin-left: 8px; /* Adjust as necessary */
}
.sl_register_buttons input[type="submit"] {
    margin-left: 16px; /* Adjust as necessary */
}
.disabled-submit {
    background-color: #ccc; /* Disabled button background */
    cursor: not-allowed;
}

/* error message when uploading wrong files in the quote list*/
.sl-error-message {
    color: red;
    font-size: 0.9em;
    display: block;
    margin-top: 5px;
}

/* Standardmäßig das reCAPTCHA-Badge ausblenden */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* Das reCAPTCHA-Badge nur auf der Datenschutzerklärung anzeigen */
.privacy-policy .grecaptcha-badge {
    visibility: visible !important;
}

/* Modal Styles */
.sl-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.sl-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px; /* Wide modal */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.sl-close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.sl-close-modal:hover,
.sl-close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Chat Styles for Frontend */
.sl-chat-container {
    border: 1px solid #e5e5e5;
    background: #f9f9f9;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border-radius: 4px;
}

.sl-chat-message {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    max-width: 80%;
    clear: both;
}

.sl-chat-message.is-admin {
    background-color: #e5f5fa;
    float: left; /* Admin messages on left for customer */
    border-bottom-left-radius: 0;
}

.sl-chat-message.is-customer {
    background-color: #dcf8c6; /* Greenish for customer */
    float: right; /* Customer messages on right */
    border-bottom-right-radius: 0;
}

.sl-chat-header {
    font-size: 0.85em;
    margin-bottom: 5px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.sl-chat-author {
    font-weight: bold;
}

.sl-chat-body {
    line-height: 1.4;
}

.sl-view-quote-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .sl-view-quote-container {
        grid-template-columns: 1fr;
    }
}

/* Clean, targeted price visibility fix */
#sl-quote-modal .woocommerce-Price-amount {
    display: inline !important;
    color: #333 !important;
}

.sl-quote-main-content table td a {
    color: #0073aa;
    text-decoration: none;
}

.sl-quote-main-content table td a:hover {
    text-decoration: underline;
}

.sl-quote-main-content img {
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.sl-customer-layout-links {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sl-customer-layout-links__title {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sl-customer-layout-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 12px;
}

/* Quote List Scrollable Container */
#quote-list-container {
    max-height: 400px; /* Adjust height as needed */
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #eee; /* Optional: adds a border around the scrollable area */
}
