/* Onwaarts Koopopties Styles */

/* Price suffix styling */
.price-suffix {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

/* Quantity input focus state */
.quantity input.ow-focused {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 1px #1a1a1a;
}

/* Positionering-context: foutmelding absoluut = geen layout-shift van add-to-cart */
form.cart .quantity,
form.cart .ow-quantity-anchor {
    position: relative;
}

/* Error message: uit de flow zodat knoppen niet verschuiven */
/* Let op: geen min-width met % — parent (.quantity) is vaak zo smal als het inputveld */
form.cart .ow-error,
.woocommerce div.product form.cart .ow-error {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    margin-top: 4px;
    margin-bottom: 0;
    padding: 5px 10px;
    box-sizing: border-box;
    width: max-content;
    min-width: min(200px, calc(100vw - 24px));
    max-width: min(320px, calc(100vw - 24px));
    z-index: 5;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    font-size: 12px;
    line-height: 1.35;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s ease-out;
    overflow-wrap: break-word;
}

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

/* Quantity label styling */
.quantity label {
    font-weight: 600;
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ow-error {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* WooCommerce integration */
.woocommerce div.product form.cart .quantity {
    margin-right: 10px;
}

.woocommerce div.product form.cart .quantity input[type="number"] {
    width: 80px;
    text-align: center;
}

/* Focus states for better UX */
.quantity input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 1px #1a1a1a;
}

/* Price display improvements */
.price {
    font-size: 1.2em;
    font-weight: 600;
    color: #1a1a1a;
}

.price-suffix {
    font-weight: 400;
    color: #666;
}
