/**
 * Brmgina Add To Cart Widget Styles
 */

.brmgina-atc-widget {
    display: inline-block;
    width: 100%;
}

.brmgina-atc-quantity {
    margin-bottom: 15px;
}

.brmgina-atc-quantity label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.brmgina-atc-quantity-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.brmgina-atc-quantity-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.brmgina-atc-form {
    display: inline-block;
    width: 100%;
}

.brmgina-atc-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.brmgina-atc-button:hover {
    background-color: #005a87;
    color: #fff;
    text-decoration: none;
}

.brmgina-atc-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.3);
}

.brmgina-atc-button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.brmgina-atc-button.loading {
    position: relative;
    color: transparent;
}

.brmgina-atc-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: brmgina-spin 1s linear infinite;
}

@keyframes brmgina-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.brmgina-atc-stock {
    margin-top: 10px;
    font-size: 14px;
}

.brmgina-atc-stock .stock {
    color: #46b450;
    font-weight: 600;
}

.brmgina-atc-stock .out-of-stock {
    color: #dc3232;
    font-weight: 600;
}

/* Success message */
.brmgina-atc-message {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.brmgina-atc-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.brmgina-atc-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive design */
@media (max-width: 768px) {
    .brmgina-atc-button {
        width: 100%;
        padding: 15px 24px;
        font-size: 18px;
    }
    
    .brmgina-atc-quantity-input {
        width: 100px;
    }
}

/* RTL Support */
.rtl .brmgina-atc-widget {
    text-align: right;
}

.rtl .brmgina-atc-quantity-input {
    text-align: center;
}

/* WooCommerce theme compatibility */
.woocommerce .brmgina-atc-button {
    background-color: var(--wc-primary-color, #007cba);
}

.woocommerce .brmgina-atc-button:hover {
    background-color: var(--wc-primary-color-hover, #005a87);
}

/* Elementor editor styles */
.elementor-editor .brmgina-atc-widget {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
}

.elementor-editor .brmgina-atc-widget:before {
    content: "Brmgina Add To Cart Widget";
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}
