﻿:root {
    --primary: #1a365d;
    --primary-dark: #153060;
    --success: #38a169;
    --rim: #0b5aa6;
    --brand: #0b5aa6;
    --blue: #2c86c7;
    --green: #46ab74;
    --sky: #53b2e4;
}

/* Compact styles for accordion embedding */
.dpp-spin-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5px;
    width: 100%;
    overflow: hidden; /* Prevent overflow */
}

.dpp-spin-card {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding:0px;
}

/* User Info - Original Styles Preserved */
.dpp-spin-user-info {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.user-info-label {
    flex: 0 0 120px;
    font-weight: 600;
    color: #2d3748;
    text-align: right;
    font-size: 0.9rem;
}

.user-info-value {
    flex: 1;
    color: #1a365d;
    font-weight: 500;
    word-break: break-word;
    font-size: 0.9rem;
}

.welcome-message {
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Compact wheel for accordion - FIXED FOR MOBILE */
.dpp-spin-wheel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    max-width: 280px;
    width: 100%;
}

    .dpp-spin-wheel-container svg {
        display: block;
        width: 100%;
        height: auto;
        margin: auto;
        max-width: 100%; /* Ensure SVG doesn't exceed container */
    }

.dpp-spin-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 28px solid;
    margin: 0;
    z-index: 10;
}

.dpp-spin-center-brand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    z-index: 5;
    background: #ffffff;
    border: 2px solid;
}

/* Compact buttons for accordion */
.dpp-spin-wheel-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

    .dpp-spin-wheel-buttons button {
        padding: 0.6rem 1.25rem;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 600;
        font-size: 0.85rem;
        min-width: 110px;
        transition: all 0.2s ease;
        flex: 1;
        max-width: 200px; /* Prevent buttons from getting too wide */
    }

#spinBtn {
    background: var(--primary);
    color: white;
}

#claimBtn {
    background: var(--success);
    color: white;
}

.dpp-spin-wheel-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Compact result message */
.dpp-spin-result {
    font-weight: bold;
    padding: 0.6rem;
    border-radius: 6px;
    text-align: center;
    margin-top: 0.5rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: #2d3748;
    font-size: 0.85rem;
    width: 100%;
    border: 1px solid #e2e8f0;
}

.alert-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

    .alert-error::before {
        content: "⚠️";
        font-size: 0.9rem;
    }

.dpp-wheel-animation {
    transition: transform 4s cubic-bezier(.33,1,.68,1);
    transform-origin: 200px 200px;
}

/* Mobile Responsive for Accordion - IMPROVED */
@@media (max-width: 768px) {
    .dpp-spin-section {
        padding: 0.15rem;
        overflow: hidden; /* Double protection */
    }

    .dpp-spin-card {
        gap: 0.6rem;
        width: 100%;
    }
    /* User Info Mobile Responsive */
    .dpp-spin-user-info {
        padding: 12px;
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
    }

    .welcome-message {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .user-info-row {
        flex-direction: column;
        gap: 3px;
        padding-bottom: 5px;
        margin-bottom: 5px;
        width: 100%;
    }

    .user-info-label {
        flex: none;
        text-align: left;
        width: 100%;
        font-size: 0.85rem;
    }

    .user-info-value {
        flex: none;
        width: 100%;
        font-size: 0.85rem;
    }
    /* Wheel Mobile Responsive - FIXED */
    .dpp-spin-wheel-container {
        max-width: 85vw; /* Use viewport width instead of fixed px */
        width: 85vw;
        margin: 0 auto;
    }

        .dpp-spin-wheel-container svg {
            max-width: 100%;
            height: auto;
        }

    .dpp-spin-pointer {
        border-left: 14px solid transparent;
        border-right: 14px solid transparent;
        border-top: 24px solid;
        top: -10px;
    }

    .dpp-spin-center-brand {
        width: 48px;
        height: 48px;
        font-size: 11px;
    }
    /* Buttons Mobile Responsive */
    .dpp-spin-wheel-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
        margin-top: 0.6rem;
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }

        .dpp-spin-wheel-buttons button {
            width: 90%;
            max-width: 180px;
            padding: 0.5rem 0.9rem;
            font-size: 0.8rem;
        }

    .dpp-spin-result {
        padding: 0.5rem;
        font-size: 0.8rem;
        margin-top: 0.4rem;
        width: 100%;
        box-sizing: border-box;
    }
}

@@media (max-width: 480px) {
    .dpp-spin-user-info {
        padding: 10px;
    }

    .welcome-message {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .user-info-label,
    .user-info-value {
        font-size: 0.8rem;
    }
    /* Further reduce wheel size for very small screens */
    .dpp-spin-wheel-container {
        max-width: 80vw;
        width: 80vw;
    }

    .dpp-spin-pointer {
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-top: 20px solid;
        top: -8px;
    }

    .dpp-spin-center-brand {
        width: 42px;
        height: 42px;
        font-size: 10px;
    }

    .dpp-spin-wheel-buttons button {
        max-width: 160px;
        padding: 0.45rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* Very small screens - EXTRA PROTECTION */
@@media (max-width: 360px) {
    .dpp-spin-section {
        padding: 0.1rem;
    }

    .dpp-spin-user-info {
        padding: 8px;
    }

    .welcome-message {
        font-size: 0.9rem;
    }

    .user-info-label,
    .user-info-value {
        font-size: 0.75rem;
    }
    /* Smallest wheel size */
    .dpp-spin-wheel-container {
        max-width: 75vw;
        width: 75vw;
    }

    .dpp-spin-center-brand {
        width: 38px;
        height: 38px;
        font-size: 9px;
    }

    .dpp-spin-wheel-buttons button {
        max-width: 140px;
        padding: 0.4rem 0.7rem;
    }
}

/* Extra small devices - MAXIMUM PROTECTION */
@@media (max-width: 320px) {
    .dpp-spin-wheel-container {
        max-width: 70vw;
        width: 70vw;
    }

    .dpp-spin-center-brand {
        width: 35px;
        height: 35px;
        font-size: 8px;
    }
}

/* Dialog responsive for mobile */
@@media (max-width: 480px) {
    .e-dialog {
        width: 90vw !important;
        max-width: 300px !important;
    }

        .e-dialog .e-dlg-content {
            padding: 0.8rem !important;
        }
}
