/* =============================================================================
   Easy SpinWheel — Frontend Styles
   ============================================================================= */

/* Overlay */
#esw-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
#esw-overlay.esw-open {
    opacity: 1;
    visibility: visible;
}

/* Modal */
#esw-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    max-width: 820px;
    width: 100%;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
    transform: scale(.92);
    transition: transform .3s;
}
#esw-overlay.esw-open #esw-modal { transform: scale(1); }

/* Close button */
#esw-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    z-index: 10;
    line-height: 1;
    padding: 4px 8px;
}
#esw-close:hover { color: #333; }

/* Left side — wheel */
.esw-wheel-side {
    flex: 0 0 370px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 24px;
    background: #fff;
    position: relative;
}

.esw-wheel-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
}

#esw-canvas {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    display: block;
}

/* Pointer */
.esw-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left:  14px solid transparent;
    border-right: 14px solid transparent;
    border-top:   28px solid #333;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
    z-index: 5;
}

/* Right side — form */
.esw-form-side {
    flex: 1;
    padding: 40px 36px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.esw-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: .5px;
    color: #1a1a1a;
}

.esw-title .esw-clover {
    color: #34a853;
    font-size: 20px;
    margin-left: 4px;
}

.esw-subtitle {
    color: #555;
    margin: 0 0 24px;
    font-size: 15px;
}

.esw-field {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 14px;
    box-sizing: border-box;
    transition: border-color .2s;
    outline: none;
}
.esw-field:focus { border-color: #F5A623; }

/* Spin button — color injected via inline style from JS */
#esw-spin-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    background: #F5A623;
    color: #fff;
    margin-top: 6px;
}
#esw-spin-btn:hover:not(:disabled) { opacity: .88; }
#esw-spin-btn:active:not(:disabled) { transform: scale(.98); }
#esw-spin-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Result */
#esw-result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 6px;
    background: #f0fdf4;
    border: 1.5px solid #34a853;
    color: #166534;
    font-size: 15px;
    display: none;
}
#esw-result.esw-error {
    background: #fef2f2;
    border-color: #ea4335;
    color: #991b1b;
}

/* Floating trigger button */
#esw-trigger {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99997;
    background: #F5A623;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    transition: transform .2s, background .2s;
    display: none; /* shown via JS after spin once, or as trigger */
}
#esw-trigger:hover { transform: translateY(-2px); }

/* Responsive */
@media (max-width: 640px) {
    #esw-modal { flex-direction: column; max-width: 360px; }
    .esw-wheel-side { flex: none; padding: 24px 16px 0; }
    .esw-wheel-wrapper { width: 240px; height: 240px; }
    #esw-canvas { width: 240px; height: 240px; }
    .esw-form-side { padding: 20px 20px 24px; }
    .esw-title { font-size: 22px; }
}
