/* Spin Wheel Coupon Styles */

.swc-wheel-container {
    text-align: center;
    margin: 20px 0;
}

/* Modern Wheel Design */
.swc-modern-wheel-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 20px;
    padding: 40px;
    margin: 20px auto;
    max-width: 1000px;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    /* Ensure padding doesn't add to width */
}

.swc-modern-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Header Section */
.swc-modern-header {
    text-align: center;
    margin-bottom: 40px;
}

.swc-modern-title {
    font-size: 3rem;
    font-weight: 900;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.swc-modern-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    opacity: 0.95;
}

.swc-modern-description {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.5;
}

/* Main Content Layout */
.swc-modern-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 30px;
}

/* Wheel Section */
.swc-wheel-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swc-wheel-wrapper {
    position: relative;
    display: inline-block;
}

#swc-wheel-canvas-inline {
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    border: 8px solid white;
}

.swc-wheel-wrapper .swc-wheel-pointer {
    position: absolute;
    top: 8px !important;
    left: 50%;
    transform: translateX(-50%);
    width: 72px !important;
    height: 72px !important;
    background: url('../arrow.webp') no-repeat center center / contain;
    z-index: 50;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

.swc-modern-spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #333, #555);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 20;
    min-width: 120px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.swc-modern-spin-button:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.swc-modern-spin-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Form Section */
.swc-form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.swc-modern-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.swc-form-input {
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.swc-form-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.swc-form-input::placeholder {
    color: #666;
}

.swc-form-button {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 18px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    /* Fix text centering and match progress bar width */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-bottom: 22px;
}

#swc-form-spin-btn {
    padding-bottom: 10px;
}

.swc-form-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

/* Progress Bar */
.swc-progress-section {
    margin: 20px 0;
}

.swc-progress-bar {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.swc-progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.swc-progress-text {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
    text-align: center;
}

/* Rules Section */
.swc-rules-section {
    margin-top: 20px;
}

.swc-rule-line {
    font-size: 14px;
    margin: 5px 0;
    opacity: 0.9;
    line-height: 1.4;
}

/* Result Message */
.swc-modern-result-message {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    animation: bounceIn 0.5s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.swc-modern-result-message.win {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
}

.swc-modern-result-message.lose {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Stack layout on tablets/phones */
    .swc-modern-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .swc-modern-header {
        text-align: center;
        padding: 0 16px;
    }

    .swc-modern-content {
        padding-left: 16px;
        padding-right: 16px;
        margin: 0 auto;
        width: 100%;
        max-width: 600px;
    }

    .swc-wheel-section,
    .swc-form-section,
    .swc-progress-section {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Constrain both canvases by viewport */
    #swc-wheel-canvas,
    #swc-wheel-canvas-inline {
        width: 100% !important;
        height: auto !important;
        max-width: 420px;
        aspect-ratio: 1 / 1;
    }

    .swc-modern-wheel-container {
        padding: 20px;
    }

    .swc-modern-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .swc-modern-title {
        font-size: 2rem;
    }

    .swc-modern-subtitle {
        font-size: 1.2rem;
    }

    #swc-wheel-canvas-inline {
        margin: 0 auto;
    }
}

.swc-spin-button {
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.swc-spin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.swc-spin-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.swc-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.swc-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.swc-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.swc-close:hover {
    color: #000;
}

/* Enhanced Wheel Styles */
.swc-wheel-wrapper {
    position: relative;
    display: inline-block;
    margin: 30px 0;
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

#swc-wheel-canvas {
    border-radius: 50%;
    /* Enhanced 3D shadow effects */
    box-shadow:
        0 0 0 8px #fff,
        0 0 0 12px #ddd,
        0 0 0 16px #bbb,
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.1);
    /* Metallic border effect */
    border: 4px solid;
    border-image: linear-gradient(45deg, #c0c0c0, #ffffff, #c0c0c0, #888888) 1;
    /* Slight 3D transform for depth */
    transform: perspective(1000px) rotateX(5deg);
    transition: transform 0.3s ease;
}

#swc-wheel-canvas:hover {
    transform: perspective(1000px) rotateX(0deg) scale(1.02);
}

/* Enhanced 3D Pointer */
.swc-wheel-wrapper .swc-wheel-pointer {
    position: absolute;
    top: 8px !important;
    left: 50%;
    transform: translateX(-50%);
    width: 72px !important;
    height: 72px !important;
    background: url('../arrow.webp') no-repeat center center / contain;
    z-index: 10;
    /* 3D shadow for pointer */
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

@media (max-width: 768px) {
    .swc-wheel-wrapper .swc-wheel-pointer {
        width: 15% !important;
        height: 15% !important;
        top: 2% !important;
    }
}


/* Enhanced 3D Spin Button */
#swc-spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #FF6B6B, #4ECDC4);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    z-index: 20;
    min-width: 120px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#swc-spin-btn:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.1) translateY(-2px);
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    background: linear-gradient(145deg, #FF7B7B, #5EDCDC);
}

#swc-spin-btn:active:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.05) translateY(0px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

#swc-spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: translate(-50%, -50%) scale(0.95);
}

/* Result Message Styles */
.swc-result-message {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.swc-result-message.win {
    background: linear-gradient(45deg, #46b450, #4ECDC4);
    color: white;
    box-shadow: 0 4px 15px rgba(70, 180, 80, 0.3);
}

.swc-result-message.lose {
    background: linear-gradient(45deg, #dc3232, #FF6B6B);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 50, 50, 0.3);
}

.swc-result-message p {
    margin: 0 0 10px 0;
}

.swc-result-message small {
    font-size: 12px;
    opacity: 0.9;
}

/* Admin Styles - Removed empty ruleset to fix lint warning */

/* Copy Button in Result Popup */
.swc-copy-result-button {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.swc-copy-result-button:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.swc-copy-result-button.swc-copied {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.swc-copy-result-button .copy-icon {
    font-size: 16px;
}

/* Coupon Code Display in Result */
.swc-result-message .coupon-code-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin: 15px 0 10px 0;
    border: 2px dashed rgba(255, 255, 255, 0.5);
}

.swc-result-message .coupon-code-display strong {
    color: #fff;
    font-size: 18px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    letter-spacing: 2px;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .swc-modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 10px;
        max-height: 95vh;
        overflow-y: auto;
    }

    .swc-wheel-wrapper {
        width: 100%;
        max-width: 400px;
        height: auto;
        padding: 10px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #swc-wheel-canvas {
        width: 380px;
        height: 380px;
        max-width: 90vw;
        max-height: 90vw;
    }

    .swc-wheel-wrapper .swc-wheel-pointer {
        top: 4px !important;
        width: 44px !important;
        height: 44px !important;
        background: url('../arrow.webp') no-repeat center center / contain;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    }

    #swc-spin-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 100px;
        width: 100%;
    }

    .swc-copy-result-button {
        padding: 10px 20px;
        font-size: 13px;
    }

    .swc-result-message .coupon-code-display strong {
        font-size: 16px;
    }

    #swc-wheel-canvas-inline {
        width: min(90vw, 420px);
        height: min(90vw, 420px);
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .swc-modern-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    .swc-wheel-section,
    .swc-form-section,
    .swc-progress-section {
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .swc-modern-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .swc-modern-content {
        padding-left: 12px;
        padding-right: 12px;
        max-width: 100%;
    }

    .swc-modal-content {
        width: 98%;
        margin: 1% auto;
        padding: 8px;
    }

    .swc-wheel-wrapper {
        width: 100%;
        padding: 5px;
    }

    #swc-wheel-canvas,
    #swc-wheel-canvas-inline {
        width: min(85vw, 360px);
        height: min(85vw, 360px);
    }

    .swc-wheel-wrapper .swc-wheel-pointer {
        top: 2px !important;
        width: 38px !important;
        height: 38px !important;
        background: url('../arrow.webp') no-repeat center center / contain;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    }

    #swc-spin-btn {
        padding: 10px 18px;
        font-size: 13px;
        min-width: 90px;
        width: 100%;
    }

    .swc-result-message {
        font-size: 14px;
        padding: 12px;
    }
}

@media (max-width: 360px) {

    #swc-wheel-canvas,
    #swc-wheel-canvas-inline {
        width: min(80vw, 300px);
        height: min(80vw, 300px);
    }

    .swc-wheel-wrapper .swc-wheel-pointer {
        top: 0px !important;
        width: 32px !important;
        height: 32px !important;
        background: url('../arrow.webp') no-repeat center center / contain;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    }

    #swc-spin-btn {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 80px;
    }
}

/* User Dashboard Styles */
.swc-user-coupons table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.swc-user-coupons th,
.swc-user-coupons td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.swc-user-coupons th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.swc-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.swc-status.active {
    background-color: #28a745;
    color: white;
}

.swc-status.used {
    background-color: #6c757d;
    color: white;
}

.swc-status.expired {
    background-color: #dc3545;
    color: white;
}

.swc-copy-coupon {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.swc-copy-coupon:hover {
    background-color: #005a87;
}