/**
 * Elementor Add to Cart Widget Styles
 * Modern, clean, and professional styling
 */

/* Widget Wrapper */
.eatc-widget-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.eatc-widget-wrapper.horizontal {
    flex-direction: row;
}

.eatc-widget-wrapper.vertical {
    flex-direction: column;
    align-items: stretch;
}

/* Force calendar and other hooked content to take full width */
.eatc-widget-wrapper > div[style*="width: 100%"] {
    flex-basis: 100%;
    width: 100%;
}

/* Quantity Controller */
.eatc-quantity-wrapper {
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
}

.eatc-qty-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    background: transparent;
}

.eatc-qty-button:hover {
    transform: scale(1.05);
}

.eatc-qty-button:active {
    transform: scale(0.95);
}

.eatc-qty-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.eatc-qty-button:disabled:hover {
    transform: none;
}

.eatc-qty-input {
    flex: 1;
    text-align: center;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
    background: transparent;
}

.eatc-qty-input::-webkit-outer-spin-button,
.eatc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Button */
.eatc-add-to-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.eatc-add-to-cart-button:hover {
    transform: translateY(-2px);
}

.eatc-add-to-cart-button:active {
    transform: translateY(0);
}

.eatc-add-to-cart-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.eatc-add-to-cart-button.loading .eatc-button-text {
    opacity: 0.5;
}

.eatc-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eatc-button-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* Loading Animation */
@keyframes eatc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.eatc-add-to-cart-button.loading .eatc-button-icon {
    animation: eatc-spin 1s linear infinite;
}

/* Error Message */
.eatc-error {
    padding: 15px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 14px;
}

/* Notification Styles */
.eatc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 999999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.eatc-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.eatc-notification-success {
    background: #4caf50;
    color: #ffffff;
}

.eatc-notification-error {
    background: #f44336;
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .eatc-widget-wrapper.horizontal {
        flex-direction: column;
        align-items: stretch;
    }

    .eatc-quantity-wrapper,
    .eatc-add-to-cart-button {
        width: 100% !important;
    }

    .eatc-notification {
        left: 20px;
        right: 20px;
        transform: translateY(-100px);
    }

    .eatc-notification.show {
        transform: translateY(0);
    }
}

