/**
 * Welcome Popup Modal - Bottom Right Corner Design
 * Compact, scrollable modal with professional styling
 */

/* ========================================
   MODAL CONTAINER - BOTTOM RIGHT CORNER
   ======================================== */
.welcome-popop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    background: transparent;
}

/* Modal Visible State - No Backdrop for Corner Position */
.welcome-popop-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

/* ========================================
   MODAL BOX - COMPACT BOTTOM RIGHT
   ======================================== */
.welcome-popop-modal .wel-offer-modal-box {
    position: relative;
    max-width: 420px;
    width: 100%;
    max-height: 550px;
    height: auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateX(100%) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.welcome-popop-modal.show .wel-offer-modal-box {
    transform: translateX(0) translateY(0);
}

/* Modal Container - Remove Padding */
.welcome-popop-modal .container {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ========================================
   HEADER SECTION - COMPACT
   ======================================== */
.welcome-popop-modal .header {
    position: relative;
    background: linear-gradient(135deg, #009966 0%, #00CC88 100%);
    padding: 20px 16px 24px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    flex-shrink: 0;
}

/* Decorative Pattern Overlay */
.welcome-popop-modal .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Alert Banner - Compact */
.welcome-popop-modal .alert-banner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.welcome-popop-modal .icon-offer {
    font-size: 14px;
    animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Close Button - Compact */
.welcome-popop-modal .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.welcome-popop-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.1);
}

/* Crown Icon - Compact */
.welcome-popop-modal .crown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    margin: 0 auto 12px;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.15),
        0 0 0 6px rgba(255, 255, 255, 0.2);
    animation: crownFloat 3s ease-in-out infinite;
}

.welcome-popop-modal .crown-icon svg {
    width: 28px;
    height: 28px;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Title - Compact */
.welcome-popop-modal .title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.welcome-popop-modal .icon-welco,
.welcome-popop-modal .icon-welco2 {
    display: inline-block;
    font-size: 16px;
    animation: bounce 1s infinite;
}

.welcome-popop-modal .icon-welco2 {
    animation-delay: 0.2s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Floating Coins - Smaller */
.welcome-popop-modal .coins {
    position: absolute;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
    animation: coinFloat 3s ease-in-out infinite;
}

.welcome-popop-modal .coin1 {
    top: 20%;
    left: 8%;
    animation-delay: 0s;
}

.welcome-popop-modal .coin2 {
    top: 60%;
    left: 12%;
    animation-delay: 0.5s;
}

.welcome-popop-modal .coin3 {
    top: 30%;
    right: 8%;
    animation-delay: 1s;
}

.welcome-popop-modal .coin4 {
    top: 70%;
    right: 12%;
    animation-delay: 1.5s;
}

@keyframes coinFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(180deg); }
}

/* ========================================
   SCROLLABLE CONTENT SECTION
   ======================================== */
.welcome-popop-modal .content {
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(550px - 150px);
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.welcome-popop-modal .content::-webkit-scrollbar {
    width: 6px;
}

.welcome-popop-modal .content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.welcome-popop-modal .content::-webkit-scrollbar-thumb {
    background: rgba(0, 153, 102, 0.4);
    border-radius: 3px;
    transition: background 0.3s;
}

.welcome-popop-modal .content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 153, 102, 0.6);
}

/* Firefox Scrollbar */
.welcome-popop-modal .content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 153, 102, 0.4) rgba(0, 0, 0, 0.05);
}

/* Bonus Offer Box - Compact */
.welcome-popop-modal .bonus-offer-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 153, 102, 0.1);
    position: relative;
    overflow: hidden;
}

.welcome-popop-modal .bonus-offer-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.welcome-popop-modal .bonus-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #009966;
    margin-bottom: 10px;
}

.welcome-popop-modal .icon-wel {
    display: inline-flex;
    align-items: center;
}

.welcome-popop-modal .bonus-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.welcome-popop-modal .bonus-amount {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #009966, #00CC88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.welcome-popop-modal .plus-icon {
    font-size: 24px;
    font-weight: 700;
    color: #009966;
}

.welcome-popop-modal .bonus-extra {
    font-size: 28px;
    font-weight: 700;
    color: #009966;
}

.welcome-popop-modal .bonus-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: #002C22;
    margin-bottom: 6px;
}

.welcome-popop-modal .bonus-info {
    font-size: 12px;
    color: #059669;
    font-weight: 500;
}

/* ========================================
   FEATURES SECTION - COMPACT
   ======================================== */
.welcome-popop-modal .features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.welcome-popop-modal .feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 153, 102, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.welcome-popop-modal .feature-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 153, 102, 0.15);
    border-color: #86efac;
}

.welcome-popop-modal .feature-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.welcome-popop-modal .feature-icon svg {
    width: 18px;
    height: 18px;
}

.welcome-popop-modal .feature-text {
    flex: 1;
    text-align: left;
}

.welcome-popop-modal .feature-title {
    font-size: 13px;
    font-weight: 700;
    color: #002C22;
    margin-bottom: 3px;
}

.welcome-popop-modal .feature-subtitle {
    font-size: 11px;
    color: #059669;
    font-weight: 500;
}

.welcome-popop-modal .checkmark {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.welcome-popop-modal .checkmark svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   REGISTER BUTTON - COMPACT
   ======================================== */
.welcome-popop-modal .register-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, #009966 0%, #00CC88 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 14px 20px;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 12px rgba(0, 153, 102, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.welcome-popop-modal .register-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.welcome-popop-modal .register-btn:hover::before {
    left: 100%;
}

.welcome-popop-modal .register-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(0, 153, 102, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.welcome-popop-modal .register-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 6px rgba(0, 153, 102, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.welcome-popop-modal .icon-welco svg,
.welcome-popop-modal .right-arrow svg {
    width: 18px;
    height: 18px;
}

.welcome-popop-modal .right-arrow {
    transition: transform 0.3s ease;
}

.welcome-popop-modal .register-btn:hover .right-arrow {
    transform: translateX(3px);
}

/* ========================================
   TRIGGER ICON - FLOATING BUTTON
   ======================================== */
.popup-trigger-icon {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #009966, #00CC88);
    box-shadow:
        0 4px 20px rgba(0, 153, 102, 0.4),
        0 0 0 0 rgba(0, 153, 102, 0.4);
    cursor: pointer;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.popup-trigger-icon.visible {
    display: flex;
}

.popup-trigger-icon:hover {
    transform: scale(1.1);
    box-shadow:
        0 6px 30px rgba(0, 153, 102, 0.6),
        0 0 0 0 rgba(0, 153, 102, 0.4);
}

.popup-trigger-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

@keyframes pulse {
    0% {
        box-shadow:
            0 4px 20px rgba(0, 153, 102, 0.4),
            0 0 0 0 rgba(0, 153, 102, 0.4);
    }
    50% {
        box-shadow:
            0 4px 20px rgba(0, 153, 102, 0.4),
            0 0 0 20px rgba(0, 153, 102, 0);
    }
    100% {
        box-shadow:
            0 4px 20px rgba(0, 153, 102, 0.4),
            0 0 0 0 rgba(0, 153, 102, 0);
    }
}

/* Hide trigger when modal is open */
.welcome-popop-modal.show ~ .popup-trigger-icon {
    display: none;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .welcome-popop-modal {
        padding: 12px;
    }

    .welcome-popop-modal .wel-offer-modal-box {
        max-width: 100%;
        max-height: 500px;
        border-radius: 14px;
    }

    .welcome-popop-modal .content {
        max-height: calc(500px - 130px);
        padding: 16px 14px;
    }

    .welcome-popop-modal .header {
        padding: 16px 14px 20px;
    }

    .welcome-popop-modal .title {
        font-size: 16px;
    }

    .welcome-popop-modal .bonus-amount {
        font-size: 32px;
    }

    .welcome-popop-modal .bonus-extra {
        font-size: 24px;
    }

    .popup-trigger-icon {
        width: 56px;
        height: 56px;
        right: 16px;
        bottom: 16px;
    }

    .popup-trigger-icon svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .welcome-popop-modal {
        padding: 8px;
    }

    .welcome-popop-modal .wel-offer-modal-box {
        max-width: 100%;
        max-height: 450px;
        border-radius: 12px;
    }

    .welcome-popop-modal .content {
        max-height: calc(450px - 120px);
        padding: 14px 12px;
    }

    .welcome-popop-modal .header {
        padding: 14px 12px 18px;
    }

    .welcome-popop-modal .crown-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
    }

    .welcome-popop-modal .crown-icon svg {
        width: 24px;
        height: 24px;
    }

    .welcome-popop-modal .title {
        font-size: 15px;
    }

    .welcome-popop-modal .bonus-offer-box {
        padding: 14px 12px;
    }

    .welcome-popop-modal .bonus-amount {
        font-size: 28px;
    }

    .welcome-popop-modal .bonus-extra {
        font-size: 20px;
    }

    .welcome-popop-modal .plus-icon {
        font-size: 20px;
    }

    .welcome-popop-modal .bonus-subtitle {
        font-size: 14px;
    }

    .welcome-popop-modal .feature-item {
        padding: 10px;
        gap: 10px;
    }

    .welcome-popop-modal .feature-icon {
        width: 36px;
        height: 36px;
    }

    .welcome-popop-modal .feature-title {
        font-size: 12px;
    }

    .welcome-popop-modal .feature-subtitle {
        font-size: 10px;
    }

    .welcome-popop-modal .register-btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    .popup-trigger-icon {
        width: 52px;
        height: 52px;
        right: 12px;
        bottom: 12px;
    }

    .popup-trigger-icon svg {
        width: 26px;
        height: 26px;
    }

    /* Wider scrollbar on mobile for easier use */
    .welcome-popop-modal .content::-webkit-scrollbar {
        width: 8px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .welcome-popop-modal,
    .welcome-popop-modal .wel-offer-modal-box,
    .welcome-popop-modal .close-btn,
    .welcome-popop-modal .register-btn,
    .welcome-popop-modal .feature-item,
    .popup-trigger-icon {
        animation: none;
        transition: none;
    }

    .welcome-popop-modal .coins,
    .welcome-popop-modal .crown-icon,
    .welcome-popop-modal .icon-offer,
    .welcome-popop-modal .icon-welco,
    .welcome-popop-modal .icon-welco2 {
        animation: none;
    }
}

/* Focus styles for accessibility */
.welcome-popop-modal .close-btn:focus,
.welcome-popop-modal .register-btn:focus,
.popup-trigger-icon:focus {
    outline: 3px solid #009966;
    outline-offset: 2px;
}
