/**
 * REZ Preorder Styles
 * CSS for preorder buttons, messages, and price display
 */

/* Preorder Button */
.rez-preorder-btn {
    display: inline-block;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-align: center;
    line-height: 1.4;
    min-height: 50px;
}

.rez-preorder-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rez-preorder-btn:active {
    transform: translateY(0);
}

.rez-preorder-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Preorder Message */
.rez-preorder-message {
    line-height: 1.5;
    text-align: center;
}

.rez-preorder-message:empty {
    display: none;
}

/* Price Display */
.rez-price-discounted {
    font-weight: 600;
    font-size: 1.1em;
}

.rez-price-original {
    font-size: 0.9em;
    text-decoration: line-through;
    opacity: 0.6;
    margin-left: 8px;
}

/* Hidden State */
.rez-hidden {
    display: none !important;
}

.rez-hide-buy-it-now-button {
    display: none !important;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .rez-preorder-btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    .rez-preorder-message {
        font-size: 13px;
        margin-top: 10px;
    }
}

/* Animation for button state changes */
@keyframes rezFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rez-preorder-btn.rez-entering {
    animation: rezFadeIn 0.3s ease;
}

/* Loading state */
.rez-preorder-btn.is-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.rez-preorder-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: rezSpin 0.6s linear infinite;
}

@keyframes rezSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Success state */
.rez-preorder-btn.is-success {
    background-color: #4caf50 !important;
}

/* Ensure proper stacking with notify me button */
.rez-btn + .rez-preorder-btn {
    margin-top: 15px;
}

.rez-preorder-btn + .rez-preorder-message {
    margin-top: 10px;
}

/* Discount badge styling (optional) */
.rez-discount-badge {
    display: inline-block;
    background-color: #f44336;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

/* Payment info styling */
.rez-payment-info {
    font-size: 0.9em;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #666;
}

/* Inventory message styling */
.rez-inventory-message {
    display: inline-block;
    color: #ff6b6b;
    font-weight: 500;
    margin-top: 4px;
}
