/**
 * Universal Take Profit Popup CSS - TZX Traders Gold Edition
 * Premium trading theme with dark blue & gold design
 * Author: TZX Traders
 * Version: 2.1
 */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* Main popup overlay */
.universal-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 11, 24, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 16px;
}

/* Main popup container */
.universal-popup {
    background: rgba(5, 11, 24, 0.95);
    border-radius: 16px;
    padding: 0;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 25px 50px -12px rgba(245, 194, 107, 0.25),
        0 0 0 1px rgba(245, 194, 107, 0.1),
        0 0 30px rgba(245, 194, 107, 0.15);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid #f5c26b;
    color: #ffffff;
}

.universal-popup.show {
    transform: scale(1);
    opacity: 1;
}

/* Close X button */
.popup-close-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(11, 20, 40, 0.9);
    border: 1px solid rgba(245, 194, 107, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #f5c26b;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.popup-close-x:hover {
    background: rgba(245, 194, 107, 0.2);
    color: #ffd98a;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 194, 107, 0.25);
    border-color: #f5c26b;
}

.popup-close-x::after {
    content: '×';
}

/* Header section */
.universal-popup-header {
    background: linear-gradient(135deg, #050b18 0%, #0b1428 50%, #121c33 100%);
    padding: 24px;
    text-align: center;
    position: relative;
    border-radius: 16px 16px 0 0;
    border-bottom: 2px solid #f5c26b;
}

.success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: rgba(245, 194, 107, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f5c26b;
    box-shadow: 0 0 20px rgba(245, 194, 107, 0.3);
}

.success-icon::after {
    content: '✓';
    color: #f5c26b;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(245, 194, 107, 0.5);
}

#universalPopupTitle {
    color: #f5c26b;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    padding-right: 40px;
    text-shadow: 0 0 10px rgba(245, 194, 107, 0.3);
}

/* Content section */
.universal-popup-content {
    padding: 32px 24px 24px;
}

/* Profit display */
.profit-display {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px;
    background: rgba(245, 194, 107, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(245, 194, 107, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profit-amount {
    font-size: 48px;
    font-weight: 700;
    color: #f5c26b;
    margin-bottom: 4px;
    line-height: 1;
    text-shadow: 0 0 20px rgba(245, 194, 107, 0.5);
    background: linear-gradient(135deg, #f5c26b, #ffd98a, #d4a24c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profit-label {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Social sharing section */
.social-sharing {
    margin-bottom: 24px;
}

.social-title {
    color: #f5c26b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.container1 {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* AddToAny button styling */
.a2a_kit {
    display: flex !important;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.a2a_button_whatsapp,
.a2a_button_x,
.a2a_button_twitter,
.a2a_button_facebook {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    background: rgba(11, 20, 40, 0.8) !important;
    border: 1px solid rgba(245, 194, 107, 0.3) !important;
    color: #f5c26b !important;
}

.a2a_button_whatsapp:hover,
.a2a_button_x:hover,
.a2a_button_twitter:hover,
.a2a_button_facebook:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 194, 107, 0.25);
    border-color: #f5c26b !important;
    background: rgba(245, 194, 107, 0.1) !important;
}

.share-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(245, 194, 107, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    background-size: 24px 24px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: rgba(11, 20, 40, 0.8);
    filter: brightness(0) saturate(100%) invert(83%) sepia(66%) saturate(326%) hue-rotate(336deg) brightness(98%) contrast(93%);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 194, 107, 0.25);
    border-color: #f5c26b;
    background-color: rgba(245, 194, 107, 0.1);
}

/* Action buttons */
.container2 {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.website-btn,
.community-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.website-btn {
    background: linear-gradient(135deg, #f5c26b, #d4a24c);
    color: #050b18;
    border: 1px solid rgba(245, 194, 107, 0.5);
}

.website-btn:hover {
    background: linear-gradient(135deg, #ffd98a, #f5c26b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 194, 107, 0.3);
    color: #050b18;
}

.community-btn {
    background: linear-gradient(135deg, #0b1428, #121c33);
    color: #f5c26b;
    border: 1px solid rgba(245, 194, 107, 0.3);
}

.community-btn:hover {
    background: linear-gradient(135deg, #121c33, #0b1428);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 194, 107, 0.15);
    border-color: #f5c26b;
    color: #ffd98a;
}

/* Close button */
.close-footer {
    padding: 0 24px 24px;
}

.universal-close-btn {
    width: 100%;
    background: rgba(11, 20, 40, 0.8);
    color: #94a3b8;
    border: 1px solid rgba(245, 194, 107, 0.2);
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.universal-close-btn:hover {
    background: rgba(245, 194, 107, 0.1);
    border-color: #f5c26b;
    color: #f5c26b;
    transform: translateY(-1px);
}

/* Enhanced Mobile Responsive design */
@media (max-width: 480px) {
    .universal-popup-overlay {
        padding: 8px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .universal-popup {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 12px;
    }
    
    .universal-popup-header {
        padding: 20px 16px;
        border-radius: 12px 12px 0 0;
    }
    
    .universal-popup-content {
        padding: 20px 16px 16px;
    }
    
    .profit-display {
        padding: 16px;
        margin-bottom: 24px;
    }
    
    .profit-amount {
        font-size: 36px;
    }
    
    #universalPopupTitle {
        font-size: 18px;
        padding-right: 35px;
    }
    
    .popup-close-x {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
        font-size: 16px;
    }
    
    .container2 {
        flex-direction: column;
        gap: 8px;
    }
    
    .website-btn,
    .community-btn {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .a2a_kit {
        gap: 6px;
    }
    
    .a2a_button_whatsapp,
    .a2a_button_x,
    .a2a_button_twitter,
    .a2a_button_facebook,
    .share-button {
        width: 40px !important;
        height: 40px !important;
    }
    
    .close-footer {
        padding: 0 16px 16px;
    }
    
    .social-sharing {
        margin-bottom: 20px;
    }
    
    .container1 {
        margin-bottom: 16px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .universal-popup-overlay {
        padding: 4px;
        padding-top: 10px;
    }
    
    .profit-amount {
        font-size: 32px;
    }
    
    #universalPopupTitle {
        font-size: 16px;
    }
    
    .a2a_button_whatsapp,
    .a2a_button_x,
    .a2a_button_twitter,
    .a2a_button_facebook,
    .share-button {
        width: 36px !important;
        height: 36px !important;
    }
}

/* Dark mode support - already dark theme by default */
@media (prefers-color-scheme: dark) {
    /* Additional dark mode refinements */
    .universal-popup {
        background: rgba(3, 7, 18, 0.95);
    }
    
    .popup-close-x {
        background: rgba(8, 16, 31, 0.9);
    }
    
    .popup-close-x:hover {
        background: rgba(245, 194, 107, 0.15);
    }
    
    .website-btn {
        background: linear-gradient(135deg, #d4a24c, #b8892e);
    }
    
    .website-btn:hover {
        background: linear-gradient(135deg, #f5c26b, #d4a24c);
    }
}

/* Gold glow animation for success icon */
@keyframes goldPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 194, 107, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(245, 194, 107, 0.5), 0 0 40px rgba(245, 194, 107, 0.2);
    }
}

.success-icon {
    animation: goldPulse 2s ease-in-out infinite;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.universal-popup.show {
    animation: fadeIn 0.2s ease-out;
}

/* Gold text shimmer effect */
@keyframes goldShimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.profit-amount {
    animation: goldShimmer 3s ease-in-out infinite;
    background-size: 200% auto;
}

/* Theme variations */
.theme-blue .universal-popup {
    border-color: #3b82f6;
}

.theme-blue .success-icon,
.theme-blue #universalPopupTitle,
.theme-blue .profit-amount,
.theme-blue .social-title {
    color: #3b82f6;
}

.theme-blue .success-icon {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.theme-blue .profit-amount {
    background: linear-gradient(135deg, #3b82f6, #60a5fa, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-purple .universal-popup {
    border-color: #a78bfa;
}

.theme-purple .success-icon,
.theme-purple #universalPopupTitle,
.theme-purple .profit-amount,
.theme-purple .social-title {
    color: #a78bfa;
}

.theme-purple .profit-amount {
    background: linear-gradient(135deg, #a78bfa, #c4b5fd, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-red .universal-popup {
    border-color: #f87171;
}

.theme-red .success-icon,
.theme-red #universalPopupTitle,
.theme-red .profit-amount,
.theme-red .social-title {
    color: #f87171;
}

.theme-red .profit-amount {
    background: linear-gradient(135deg, #f87171, #fca5a5, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Apply theme to buttons */
.theme-blue .website-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.theme-purple .website-btn {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
}

.theme-red .website-btn {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
}