/**
 * Minim Spread Achizitie - Styles
 */

.msa-widget-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Header Section */
.msa-header {
    margin-bottom: 30px;
    text-align: center;
}

.msa-add-to-cart-btn {
    width: 100%;
    max-width: 400px;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border: none !important;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #000000 !important;
    background: #000000 !important;
    color: #ffffff !important;
    margin-bottom: 15px;
}

.msa-add-to-cart-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.msa-add-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.msa-message {
    margin-top: 10px;
}

.msa-minimum-text {
    font-size: 14px;
    color: #333;
    margin: 5px 0;
    font-weight: 600;
}

.msa-remaining-text {
    font-size: 14px;
    color: #d32f2f;
    margin: 5px 0;
    font-weight: 600;
}

.msa-remaining-count {
    font-weight: bold;
    font-size: 16px;
}

/* Variations Container */
.msa-variations-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msa-variation-item {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    align-items: center;
    transition: all 0.3s ease;
    background: #fff;
}

.msa-variation-item:hover {
    border-color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Column 1 - Quantity Display */
.msa-quantity-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.msa-quantity-display {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    margin-bottom: 5px;
}

.msa-quantity-label {
    font-size: 6px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Column 2 - Variation Info */
.msa-info-column {
    display: flex;
    align-items: center;
    gap: 15px;
}

.msa-variation-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.msa-variation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.msa-variation-details {
    flex: 1;
}

.msa-variation-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
}

.msa-variation-price {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
}

.msa-variation-price .woocommerce-Price-amount {
    font-weight: bold;
}

/* Column 3 - Controls */
.msa-controls-column {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.msa-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #000000;
    background: #fff;
    color: #000000;
    font-size: 24px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.msa-btn:hover:not(:disabled) {
    background: #000000;
    color: #fff;
    transform: scale(1.1);
}

.msa-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

.msa-btn:active:not(:disabled) {
    transform: scale(0.95);
}

/* Success/Error Messages */
.msa-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    font-weight: 600;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.msa-notification.success {
    background: #4caf50;
    color: white;
}

.msa-notification.error {
    background: #f44336;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .msa-variation-item {
        grid-template-columns: 60px 1fr 100px;
        gap: 10px;
        padding: 12px;
    }
    
    .msa-quantity-display {
        font-size: 24px;
    }
    
    .msa-variation-image {
        width: 60px;
        height: 60px;
    }
    
    .msa-variation-name {
        font-size: 14px;
    }
    
    .msa-variation-price {
        font-size: 16px;
    }
    
    .msa-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .msa-controls-column {
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .msa-variation-item {
        grid-template-columns: 50px 1fr 90px;
        gap: 8px;
        padding: 10px;
    }
    
    .msa-quantity-display {
        font-size: 20px;
    }
    
    .msa-info-column {
        gap: 10px;
    }
    
    .msa-variation-image {
        width: 50px;
        height: 50px;
    }
    
    .msa-variation-name {
        font-size: 13px;
    }
    
    .msa-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

/* Loading State */
.msa-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.msa-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

