/**
 * See Price - Elementor Popup Frontend Styles
 *
 * @package See_Price_Elementor_Popup
 */

/* ========================================
   See Price Button Wrapper
   ======================================== */

.spep-button-wrapper {
    margin: 20px 0;
    display: block;
    clear: both;
}

/* ========================================
   See Price Button
   ======================================== */

.spep-see-price-button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px!important;
    font-weight: 600!important;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 4px;
    background-color: #ffffff!important;
    color: #217BFF!important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 2px solid;
}

/* Hover State */
.spep-see-price-button:hover {
    background-color: #005177;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Active State */
.spep-see-price-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Focus State */
.spep-see-price-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Loading State */
.spep-see-price-button.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.spep-see-price-button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spep-spin 0.6s linear infinite;
}

/* Disabled State */
.spep-see-price-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   Loading Animation
   ======================================== */

@keyframes spep-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Error Message
   ======================================== */

.spep-error-message {
    display: block;
    margin: 15px 0;
    padding: 12px 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.spep-error {
    color: #dc3232;
    font-size: 14px;
    margin: 10px 0;
    padding: 10px;
    background-color: #fff5f5;
    border-left: 4px solid #dc3232;
}

/* ========================================
   Responsive Styles
   ======================================== */

@media screen and (max-width: 768px) {
    .spep-see-price-button {
        display: block;
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
        font-weight: 600!important;
    }

    .spep-button-wrapper {
        margin: 15px 0;
    }
}

/* ========================================
   WooCommerce Integration
   ======================================== */

/* Position button in place of price */
.summary .spep-button-wrapper {
    margin-bottom: 20px;
}

/* Ensure button appears correctly with WooCommerce elements */
.single-product .spep-button-wrapper {
    order: 2;
}

/* ========================================
   Theme Compatibility
   ======================================== */

/* Storefront Theme */
.storefront .spep-see-price-button {
    background-color: #96588a;
}

.storefront .spep-see-price-button:hover {
    background-color: #7a4772;
}

/* Astra Theme */
.ast-woocommerce-container .spep-see-price-button {
    border-radius: 3px;
}

/* OceanWP Theme */
.oceanwp-theme .spep-see-price-button {
    font-weight: 700;
}

/* Flatsome Theme */
.product-type-simple .spep-button-wrapper {
    margin: 20px 0;
}

/* ========================================
   Elementor Compatibility
   ======================================== */

.elementor-widget-woocommerce-product-price + .spep-button-wrapper {
    margin-top: 15px;
}

/* ========================================
   Custom Button Styles
   (Users can add custom classes)
   ======================================== */

/* Large Button */
.spep-button-large.spep-see-price-button {
    padding: 15px 40px;
    font-size: 18px;
}

/* Small Button */
.spep-button-small.spep-see-price-button {
    padding: 8px 20px;
    font-size: 14px;
}

/* Rounded Button */
.spep-button-rounded.spep-see-price-button {
    border-radius: 50px;
}

/* Outline Button */
.spep-button-outline.spep-see-price-button {
    background-color: transparent;
    border: 2px solid #0073aa;
    color: #0073aa !important;
}

.spep-button-outline.spep-see-price-button:hover {
    background-color: #0073aa;
    color: #ffffff !important;
}

/* Full Width Button */
.spep-button-fullwidth.spep-see-price-button {
    display: block;
    width: 100%;
}

/* ========================================
   Animation Effects
   ======================================== */

/* Pulse Animation */
@keyframes spep-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.spep-button-pulse.spep-see-price-button:hover {
    animation: spep-pulse 1s infinite;
}

/* Shake Animation */
@keyframes spep-shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.spep-button-attention.spep-see-price-button {
    animation: spep-shake 0.5s ease-in-out 3s 3;
}

/* ========================================
   RTL Support
   ======================================== */

[dir="rtl"] .spep-button-wrapper {
    text-align: right;
}

[dir="rtl"] .spep-see-price-button {
    letter-spacing: 0;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .spep-button-wrapper,
    .spep-see-price-button {
        display: none !important;
    }
}

/* ========================================
   Accessibility
   ======================================== */

/* High contrast mode */
@media (prefers-contrast: high) {
    .spep-see-price-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .spep-see-price-button {
        transition: none;
        animation: none;
    }

    .spep-see-price-button:hover {
        transform: none;
    }
}

/* Focus visible (keyboard navigation) */
.spep-see-price-button:focus-visible {
    outline: 3px solid #0073aa;
    outline-offset: 3px;
}
