/* Spin-to-Win: Luxury Side-Sheet Aesthetic */

/* Floating Button Above WhatsApp */
.sw-trigger-btn {
    position: fixed;
    bottom: 110px;
    left: 30px !important;
    z-index: 99999 !important;
    background: #831843 !important;
    color: #fff !important;
    border: 3px solid #d4af37 !important;
    width: 65px !important;
    height: 65px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important; /* Always show by default */
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sw-trigger-btn.sw-hidden {
    display: none !important;
}

@keyframes sw-pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

@media (max-width: 480px) {
    .sw-trigger-btn {
        bottom: 160px; /* Dynamic positioning will override this */
        left: 20px !important;
        width: 50px !important;
        height: 50px !important;
    }
    
    .sw-side-sheet {
        width: 100% !important; /* Full width on mobile */
        max-width: 100% !important;
    }
}

.sw-trigger-btn:hover {
    transform: scale(1.1) rotate(15deg);
    background: #000;
    border-color: #d4af37;
    color: #d4af37;
}

.sw-trigger-btn i {
    font-size: 1.5rem;
}

/* Side Sheet (Drawer) */
.sw-side-sheet {
    position: fixed;
    top: 0;
    left: -100%; /* Hidden by default */
    width: 400px; /* More compact width */
    height: 100vh;
    background: #fff;
    z-index: 10002;
    box-shadow: 20px 0 60px rgba(0,0,0,0.15);
    transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    color: #333;
}

.sw-side-sheet.active {
    left: 0;
}

/* Overlay for Side Sheet */
.sw-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.sw-sheet-overlay.active {
    display: block;
    opacity: 1;
}

/* Header Area */
.sw-header {
    padding: 1.5rem 1.5rem 1rem; /* Compact padding */
    position: relative;
    text-align: center;
}

.sw-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.sw-close-btn:hover {
    color: var(--color-primary);
}

/* Wheel Container in Side Sheet */
.sw-wheel-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5px 0; /* Compact padding */
}

.sw-wheel-container {
    position: relative;
    width: 340px; /* Slightly more compact wheel */
    height: 340px;
}

.sw-wheel-canvas {
    width: 100%;
    height: 100%;
}

/* Modern Minimal Pointer */
.sw-pointer-modern {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 40px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

/* Form Section */
/* Custom Luxury Toast Notifications */
.sw-toast {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    background: #831843;
    color: #fff;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 10px 30px rgba(131, 24, 67, 0.4);
    z-index: 10005;
    transform: translateY(-150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sw-toast.active {
    transform: translateY(0);
}

.sw-footer-form {
    padding: 1.5rem; /* Compact padding */
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.sw-input {
    width: 100%;
    padding: 12px 18px; /* More compact inputs */
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.sw-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.sw-spin-btn {
    width: 100%;
    background: #831843;
    color: #fff;
    border: none;
    padding: 15px; /* Compact button */
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    display: block !important;
}

.sw-spin-btn:hover {
    background: #000;
    transform: translateY(-2px);
}

/* Result Design */
.sw-result-card {
    text-align: center;
    padding: 2rem;
    display: none;
}

.sw-reward-val {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.sw-coupon-box {
    background: #fff;
    border: 2px dashed #d4af37;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    cursor: pointer;
}

.sw-coupon-code {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .sw-side-sheet {
        width: 100%;
    }
    .sw-wheel-container {
        width: 300px;
        height: 300px;
    }
}
