/* Welcome Popup - Mobile First Responsive Design */

/* Overlay */
.welcome-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Popup Container */
.welcome-popup {
    background: #ffffff;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(220, 38, 38, 0.3) transparent;
}

/* Custom scrollbar for popup */
.welcome-popup::-webkit-scrollbar {
    width: 6px;
}

.welcome-popup::-webkit-scrollbar-track {
    background: transparent;
}

.welcome-popup::-webkit-scrollbar-thumb {
    background-color: rgba(220, 38, 38, 0.3);
    border-radius: 20px;
}

.welcome-popup::-webkit-scrollbar-thumb:hover {
    background-color: rgba(220, 38, 38, 0.5);
}

.welcome-popup-overlay.active .welcome-popup {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popup-close:hover {
    background: #fff;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popup-close svg {
    width: 18px;
    height: 18px;
    color: #374151;
}

/* Popup Content */
.popup-content {
    padding: 25px 20px 20px;
    position: relative;
    z-index: 2;
    background: transparent;
}

/* Hero Section */
.popup-hero {
    text-align: center;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.popup-badge {
    display: inline-block;
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: white;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.popup-title {
    margin-bottom: 15px;
}

.title-line-1 {
    display: block;
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.title-line-2 {
    display: block;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #000000 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.popup-logo {
    margin-top: 15px;
    position: relative;
    display: inline-block;
}

.logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 2px;
    color: #DC2626;
    display: block;
}

.logo-underline {
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #DC2626 50%, transparent 100%);
    margin-top: 5px;
    animation: expandWidth 1.5s ease 0.5s both;
}

@keyframes expandWidth {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Features Grid - Mobile First */
.popup-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.feature-card {
    background: #ffffff;
    background-color: #ffffff;
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: slideIn 0.6s ease both;
    transition: all 0.3s ease;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
}

.feature-card:nth-child(1) {
    animation-delay: 0.4s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.5s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    color: #DC2626;
}

.feature-card h3 {
    font-size: 13px;
    font-weight: 700;
    color: #000;
    margin-bottom: 1px;
}

.feature-card p {
    font-size: 11px;
    color: #6B7280;
    margin: 0;
}

/* Message Section */
.popup-message {
    margin-bottom: 20px;
    animation: fadeIn 0.8s ease 0.7s both;
}

.message-text {
    font-size: 12px;
    line-height: 1.5;
    color: #374151;
    text-align: center;
    margin-bottom: 12px;
    display: none;
}

.message-text strong {
    color: #000;
    font-weight: 700;
}

.message-highlight {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border-left: 3px solid #DC2626;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    line-height: 1.4;
    color: #374151;
}

.highlight-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* CTA Buttons */
.popup-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.cta-primary {
    width: 100%;
    padding: 14px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cta-secondary {
    width: 100%;
    padding: 12px 18px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.cta-primary {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    }
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(220, 38, 38, 0.4);
}

.cta-primary svg {
    width: 16px;
    height: 16px;
}

.cta-secondary {
    background: white;
    color: #374151;
    border: 2px solid #E5E7EB;
}

.cta-secondary:hover {
    background: #F9FAFB;
    border-color: #DC2626;
    color: #DC2626;
}

/* Footer */
.popup-footer {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #E5E7EB;
}

.dont-show-again {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 11px;
    color: #6B7280;
    transition: color 0.3s ease;
    user-select: none;
}

.dont-show-again:hover {
    color: #374151;
}

/* Custom Checkbox Styling */
.dont-show-again input[type="checkbox"] {
    position: relative;
    width: 16px;
    height: 16px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dont-show-again input[type="checkbox"]:hover {
    border-color: #DC2626;
    transform: scale(1.1);
}

.dont-show-again input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    border-color: #DC2626;
    animation: checkboxPop 0.3s ease;
}

@keyframes checkboxPop {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1.1);
    }
}

.dont-show-again input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-1px, -1px) scale(0);
    }
    100% {
        opacity: 1;
        transform: rotate(45deg) translate(-1px, -1px) scale(1);
    }
}

.dont-show-again input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.dont-show-again span {
    position: relative;
    top: 1px;
    transition: all 0.3s ease;
}

.dont-show-again:hover span {
    color: #374151;
}

/* Decorative Elements */
.popup-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 20px;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.03;
}

.circle-1 {
    width: 200px;
    height: 200px;
    background: #DC2626;
    top: -50px;
    right: -50px;
    animation: float 6s ease-in-out infinite;
}

.circle-2 {
    width: 150px;
    height: 150px;
    background: #000;
    bottom: -30px;
    left: -30px;
    animation: float 8s ease-in-out infinite reverse;
}

.circle-3 {
    width: 100px;
    height: 100px;
    background: #DC2626;
    top: 50%;
    left: -50px;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
    .welcome-popup {
        max-width: 500px;
        max-height: calc(100vh - 60px);
        max-height: calc(100dvh - 60px);
    }

    .popup-content {
        padding: 30px 25px 25px;
    }

    .title-line-1 {
        font-size: 16px;
    }

    .title-line-2 {
        font-size: 28px;
    }

    .logo-text {
        font-size: 20px;
        letter-spacing: 3px;
    }

    .popup-features {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .feature-card {
        flex-direction: column;
        text-align: center;
        padding: 15px 10px;
    }

    .feature-card h3 {
        font-size: 12px;
    }

    .feature-card p {
        font-size: 10px;
    }

    .message-text {
        font-size: 13px;
    }

    .message-highlight {
        font-size: 12px;
        padding: 12px;
    }

    .popup-cta {
        flex-direction: row;
        gap: 10px;
    }

    .cta-primary,
    .cta-secondary {
        flex: 1;
        font-size: 13px;
        padding: 12px 18px;
    }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
    .welcome-popup {
        max-width: 550px;
        max-height: calc(100vh - 80px);
        max-height: calc(100dvh - 80px);
    }

    .popup-content {
        padding: 35px 30px 30px;
    }

    .popup-close {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }

    .popup-close svg {
        width: 18px;
        height: 18px;
    }

    .popup-badge {
        font-size: 11px;
        padding: 6px 16px;
    }

    .title-line-1 {
        font-size: 18px;
    }

    .title-line-2 {
        font-size: 32px;
    }

    .logo-text {
        font-size: 24px;
        letter-spacing: 4px;
    }

    .feature-card {
        padding: 18px 12px;
        transition: all 0.3s ease;
    }

    .feature-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }

    .feature-card h3 {
        font-size: 13px;
    }

    .feature-card p {
        font-size: 11px;
    }

    .message-text {
        font-size: 14px;
    }

    .message-highlight {
        font-size: 13px;
    }

    .cta-primary,
    .cta-secondary {
        font-size: 14px;
        padding: 14px 24px;
    }
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    .welcome-popup {
        max-width: 600px;
        max-height: calc(100vh - 100px);
        max-height: calc(100dvh - 100px);
    }

    .popup-content {
        padding: 40px 35px 35px;
    }

    .title-line-2 {
        font-size: 36px;
    }

    .popup-features {
        gap: 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .welcome-popup-overlay,
    .welcome-popup,
    .feature-card,
    .cta-primary,
    .cta-secondary,
    .popup-close {
        transition: none;
    }

    .popup-badge,
    .logo-underline,
    .decoration-circle {
        animation: none;
    }
}

/* Remove Dark Mode Support - Keep consistent white theme */
/* Commented out for consistent experience across all devices
@media (prefers-color-scheme: dark) {
    // Dark mode styles removed to maintain white background
}
*/

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .popup-badge {
        background: #DC2626;
    }

    .cta-primary {
        background: #DC2626;
    }

    .feature-card {
        border: 2px solid #000;
    }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    .welcome-popup {
        background: #ffffff !important;
        -webkit-background-clip: padding-box !important;
        background-clip: padding-box !important;
    }

    .feature-card {
        background: #ffffff !important;
        -webkit-background-clip: padding-box !important;
        background-clip: padding-box !important;
    }

    .message-highlight {
        background: #FEF2F2 !important;
    }

    .popup-close {
        background: rgba(255, 255, 255, 0.95) !important;
    }
}

/* iOS Safari Specific */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-width: 768px) {
    .welcome-popup {
        background: #ffffff;
        background-image: none;
    }

    .popup-content {
        background: transparent;
    }

    .feature-card {
        background: #ffffff;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Prevent iOS zoom on input focus */
@media screen and (max-width: 768px) {
    input[type="checkbox"] {
        font-size: 16px !important;
    }
}

/* Print Styles */
@media print {
    .welcome-popup-overlay {
        display: none;
    }
}