/*
 * WOF Wheel Styles
 */

/* بارگذاری فونت YekanBakh از پوشه محلی */
@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/Yekan Bakh FaNum 04 Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

/* وزن bold از همان فایل استفاده می‌شود */
@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/Yekan Bakh FaNum 04 Regular.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: block;
}

/* اطمینان از لود شدن فونت قبل از استفاده */
body::after {
    content: '';
    font-family: 'YekanBakh';
    position: absolute;
    visibility: hidden;
    width: 0;
    height: 0;
}

/* Wrapper for wheel and form */
.wof-wrapper {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    font-family: 'YekanBakh', 'Tahoma', Arial, sans-serif;
    padding: 10px 0;
}

.wof-wrapper * {
    font-family: 'YekanBakh', 'Tahoma', Arial, sans-serif !important;
}

/* بقیه استایل‌ها... */
/* Sections */
.wof-wheel-section,
.wof-form-section {
    flex: 1 1 300px;
    max-width: 420px;
}

/* Wheel container */
.wof-wheel-container {
    position: relative;
    width: 360px;
    height: 360px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rotator provides the outer frame and glossy effect */
.wof-wheel-rotator {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 35% 20%, #ffffff, #e6e6e6 45%, #c7c7c7 100%);
    box-shadow:
        0 20px 40px rgba(0,0,0,0.25),
        0 0 0 12px rgba(255,255,255,0.9),
        0 0 0 18px rgba(0,0,0,0.12),
        inset 0 0 40px rgba(255,255,255,0.4);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Canvas takes full size of rotator */
#wof-wheel-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.wof-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'YekanBakhPanel', 'YekanBakh', 'Tahoma', Arial, sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 4px;
}


/* Pointer above wheel */
.wof-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff, #f9f9f9 50%, #d2d2d2 100%);
    box-shadow:
        0 8px 14px rgba(0,0,0,0.25),
        inset 0 2px 6px rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

.wof-pointer-head {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 16px solid #ff4545;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

/* Center overlay (default size, can be overridden by inline styles) */
.wof-center-overlay {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    z-index: 25;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(255,255,255,0.65), rgba(255,255,255,0.1) 70%);
}

.wof-center-inner {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, rgba(255,255,255,0.95), rgba(255,255,255,0.25));
    box-shadow:
        inset 0 3px 6px rgba(255,255,255,0.9),
        0 8px 16px rgba(0,0,0,0.3);
}

/* Form container */
.wof-form-section {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 14px;
    box-shadow:
        0 4px 18px rgba(0,0,0,0.12),
        inset 0 0 10px rgba(255,255,255,0.4);
    transition: 0.2s ease;
}

/* Input rows */
.wof-form-row { margin-bottom: 16px; }
.wof-form-row label { 
    font-size: 13px; 
    margin-bottom: 6px; 
    display: block;
    font-weight: 500;
}
.wof-form-row input[type="text"],
.wof-form-row input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    direction: ltr;
    text-align: left;
}
.wof-form-row input:focus { 
    border-color: #ff9800;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

/* Buttons */
.wof-spin-button {
    background: linear-gradient(135deg, #ff4d4d, #ff9100);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255,82,82,0.5);
    transition: 0.2s ease;
    width: 100%;
}
.wof-spin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(255,140,0,0.6);
}
.wof-spin-button:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.wof-spin-button:disabled { 
    opacity: 0.6;
    cursor: not-allowed;
}

.wof-spin-button.spinning {
    position: relative;
    pointer-events: none;
}

.wof-spin-button.spinning::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wof-spin-loader 0.6s linear infinite;
}

@keyframes wof-spin-loader {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Messages */
.wof-message { margin-top: 12px; font-size: 14px; }
.wof-success { 
    color: #2e7d32; 
    background: #e8f5e9;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}
.wof-error { 
    color: #c62828;
    background: #ffebee;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Required field indicator */
.wof-required {
    color: #d93025;
    margin-right: 3px;
}

/* Rules section */
.wof-rules { 
    margin-top: 20px; 
    font-size: 13px; 
    color: #555;
    line-height: 1.8;
}
.wof-rules h4 { 
    font-size: 15px; 
    margin-bottom: 8px; 
    font-weight: bold;
    color: #333;
}

/* Fullscreen confetti canvas */
#wof-confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none;
    z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wof-wheel-container { width: 300px; height: 300px; }
    .wof-form-row label { font-size: 12px; }
    .wof-form-row input[type="text"],
    .wof-form-row input[type="tel"] { font-size: 14px; padding: 10px 12px; }
}



.wof-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'YekanBakhPanel', 'YekanBakh'!important;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 4px;
}