/* GBS Offerte Systeem Frontend Styles */

/* Offerte button styling */
.gbs-add-to-offerte-btn,
.gbs-add-to-offerte-btn-loop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 5px 10px 0;
    padding: .618em 1em;
    background: #009fe3;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.618;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    vertical-align: middle;
}

.gbs-add-to-offerte-btn {
	background: #fff !important;
}
.gbs-add-to-offerte-btn:hover,
.gbs-add-to-offerte-btn-loop:hover {
    background: #0089c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    color: white;
    text-decoration: none;
}

.gbs-add-to-offerte-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.gbs-add-to-offerte-btn-loop.added {
    background: #27ae60;
}

/* Spinner animation */
.gbs-spinner {
    animation: gbs-spin 1s linear infinite;
}

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

/* Offerte notice */
.gbs-offerte-notice {
    margin-top: 150px;
    position: absolute;
    padding: 15px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

.gbs-offerte-notice a {
    color: #0d4d1a;
    text-decoration: underline;
    margin-left: 10px;
}

/* Offerte Cart Styles */
.gbs-offerte-form-wrapper {

    padding: 20px;
}

.gbs-offerte-products {
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.gbs-offerte-products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.gbs-offerte-products-table th,
.gbs-offerte-products-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.gbs-offerte-products-table th {
    background-color: #e9ecef;
    font-weight: 600;
    color: #495057;
}

.gbs-offerte-products-table tbody tr:hover {
    background-color: #f1f3f4;
}

.gbs-offerte-products-table tfoot th {
    background-color: #fff;
    border-top: 2px solid #495057;
    font-weight: bold;
    font-size: 16px;
}

/* Cart quantity controls */
.gbs-offerte-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gbs-offerte-quantity input {
    width: 60px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 5px;
}

.gbs-remove-from-offerte {
    color: #dc3545;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.gbs-remove-from-offerte:hover {
    background-color: #f8d7da;
    color: #721c24;
    text-decoration: none;
}

/* Form styles */
.gbs-offerte-customer-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gbs-form-row {
    margin-bottom: 20px;
}

.gbs-form-row.gbs-form-cols {
    display: flex;
    gap: 20px;
}

.gbs-form-col {
    flex: 1;
}

.gbs-offerte-customer-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.gbs-offerte-customer-form input,
.gbs-offerte-customer-form select,
.gbs-offerte-customer-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.gbs-offerte-customer-form input:focus,
.gbs-offerte-customer-form select:focus,
.gbs-offerte-customer-form textarea:focus {
    outline: none;
    border-color: #009fe3;
    box-shadow: 0 0 0 0.2rem rgba(0, 159, 227, 0.25);
}

.gbs-offerte-customer-form input.error,
.gbs-offerte-customer-form select.error,
.gbs-offerte-customer-form textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.required {
    color: #dc3545;
}

.gbs-form-actions {
    text-align: center;
    margin-top: 30px;
}

.gbs-form-actions button {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    background: #ffa501;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gbs-form-actions button:hover {
    background: #e69401;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.gbs-form-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Cart count badge */
.gbs-offerte-cart-count {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #dc3545;
    color: white;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    margin-left: 5px;
    font-weight: bold;
}

/* WooCommerce notice integration */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
    margin-bottom: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .gbs-form-row.gbs-form-cols {
        flex-direction: column;
        gap: 0;
    }

    .gbs-offerte-products-table {
        font-size: 14px;
    }

    .gbs-offerte-products-table th,
    .gbs-offerte-products-table td {
        padding: 8px;
    }

    .gbs-add-to-offerte-btn,
    .gbs-add-to-offerte-btn-loop {
        display: block;
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }
}

/* Success and error states */
.gbs-success {
    padding: 15px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    margin-bottom: 20px;
}

.gbs-error {
    padding: 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin-bottom: 20px;
}

/* Loading states */
.gbs-loading {
    opacity: 0.6;
    pointer-events: none;
}

.gbs-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #009fe3;
    border-radius: 50%;
    animation: gbs-spin 1s linear infinite;
}

#privacy_accept {
    width: auto;
}


.woocommerce-message, .woocommerce-error {
    background: #ffa501;
    color: #fff;
}

#order_review {
    border: 1px solid #f2f2f2;
    padding: 20px;
    border-radius: 20px;
}

/* BTW/Tax display styling */
.gbs-offerte-products-table tfoot tr.cart-subtotal td,
.gbs-offerte-products-table tfoot tr.cart-subtotal th {
    border-top: 2px solid #dee2e6;
    padding-top: 15px;
    font-weight: 600;
}

.gbs-offerte-products-table tfoot tr.cart-tax td,
.gbs-offerte-products-table tfoot tr.cart-tax th {
    color: #666;
    font-weight: normal;
    font-size: 14px;
}

.gbs-offerte-products-table tfoot tr.cart-tax-info td,
.gbs-offerte-products-table tfoot tr.cart-tax-info th {
    color: #666;
    font-weight: normal;
    font-size: 14px;
    font-style: italic;
}

.gbs-offerte-products-table tfoot tr.cart-total-incl td,
.gbs-offerte-products-table tfoot tr.cart-total-incl th {
    border-top: 2px solid #495057;
    padding-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #212529;
}

.gbs-offerte-products-table tfoot tr.total-row th {
    border-top: 2px solid #495057;
    padding-top: 15px;
    font-size: 16px;
}

.gbs-offerte-products-table tfoot tr.tax-info-row th {
    color: #666;
    font-weight: normal;
    font-size: 14px;
    font-style: italic;
    border-top: 1px solid #dee2e6;
}

/* Cart page BTW styling */
.gbs-offerte-cart-table tfoot tr.cart-subtotal {
    border-top: 2px solid #e0e0e0;
}

.gbs-offerte-cart-table tfoot tr.cart-subtotal td {
    padding-top: 15px;
    font-weight: 600;
    font-size: 16px;
}

.gbs-offerte-cart-table tfoot tr.cart-tax td,
.gbs-offerte-cart-table tfoot tr.cart-tax-info td {
    color: #666;
    font-weight: normal;
    font-size: 14px;
}

.gbs-offerte-cart-table tfoot tr.cart-tax-info td em {
    font-style: italic;
}

.gbs-offerte-cart-table tfoot tr.cart-total-incl td {
    border-top: 2px solid #333;
    padding-top: 15px;
    font-size: 18px;
    font-weight: bold;
}