/* Responsive media queries extracted from webapp-online.html */
/* Generated on 2026-03-24 */

@media (max-width: 1000px) {
    .popup {
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
        background-color: #0A0A2A;
        border-radius: 0 !important;
        animation: mobSlideIn 0.3s ease-out;
        overflow: hidden !important;
    }

    @keyframes mobSlideIn {
        from { transform: translateX(30%); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
    }
    @keyframes mobSlideOut {
        from { transform: translateX(0); opacity: 1; }
        to { transform: translateX(30%); opacity: 0; }
    }

    /* Hide X on mobile */
    .popup .close-button { display: none !important; }

    /* Kill all floats on mobile */
    .popup .imageContainer,
    .popup .captionContainer,
    .popup .buttons,
    .popup .right-column {
        float: none !important;
        width: 100% !important;
    }

    /* Mobile top bar */
    .popup .mob-topbar {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px 15px !important;
        height: auto !important;
        min-height: auto !important;
        flex-shrink: 0;
        position: relative;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .popup .mob-topbar .mob-back {
        position: absolute;
        left: 4px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: rgba(255,255,255,0.85);
        font-size: 16px;
        padding: 12px;
        cursor: pointer;
        line-height: 1;
        display: flex;
        align-items: center;
    }
    .popup .mob-topbar .mob-share {
        position: absolute !important;
        right: 4px !important;
        left: auto !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: none !important;
        border: none !important;
        color: rgba(255,255,255,0.85);
        font-size: 16px !important;
        padding: 12px !important;
        cursor: pointer;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    /* Reset right-column on mobile — scrolls between image and fixed bottom bar */
    .popup .right-column {
        padding: 0 16px !important;
        padding-bottom: 200px !important; /* space for fixed bottom bar */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        height: auto !important;
    }

    /* Hide watermark labels on mobile */
    .popup .watermark-positions h4,
    .popup .watermark-colors h4 {
        display: none !important;
    }

    /* Fixed bottom bar: positions → colors → buttons stacked */
    .popup .watermark-controls {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        z-index: 100 !important;
        background-color: #fff !important;
        padding: 8px 16px !important;
        padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
        border-top: 1px solid rgba(255,255,255,0.06) !important;
        border-radius: 0 !important;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.25) !important;
        max-height: none !important;
        height: auto !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        overflow: visible !important;
    }

    /* Compact watermark rows on mobile — centered */
    .popup .watermark-positions,
    .popup .watermark-colors {
        margin: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* Position & color buttons — scale 1.4x from original (25→35, 5→7, 12→17, 3→4) */
    .popup .position-buttons {
        margin-bottom: 0 !important;
        display: flex !important;
        justify-content: center !important;
    }

    .popup .position-grid {
        gap: 20px !important;
        justify-content: center !important;
    }

    .popup .position-button {
        transform: scale(1.4) !important;
        margin: 3px !important;
    }

    .popup .color-buttons {
        gap: 20px !important;
        justify-content: center !important;
    }

    .popup .color-button {
        transform: scale(1.4) !important;
        margin: 3px !important;
    }

    /* Position buttons row */
    .popup .watermark-positions {
        order: 1 !important;
        margin-top: 4px !important;
    }

    /* Color buttons row */
    .popup .watermark-colors {
        order: 2 !important;
        margin-bottom: 4px !important;
    }

    /* Hide original buttons on mobile — replaced by Repost trigger */
    .popup .watermark-controls .buttons {
        display: none !important;
    }

    /* Repost trigger button */
    .popup .mob-repost-trigger {
        order: 3 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: auto;
        min-width: 0;
        align-self: center;
        padding: 14px 50px;
        margin: 4px 0 8px;
        border: none;
        border-radius: 14px;
        background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
        color: white;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        letter-spacing: 0.3px;
        margin-bottom: calc(env(safe-area-inset-bottom));
    }

    /* Slide-up actions panel */
    .popup .mob-actions-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: #1A1A3A;
        border-radius: 20px 20px 0 0;
        padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
        transform: translateY(100%);
        transition: transform 0.3s ease;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.4);
    }
    .popup .mob-actions-panel.open {
        transform: translateY(0);
    }
    .popup .mob-actions-panel .mob-actions-handle {
        width: 36px;
        height: 4px;
        background: rgba(255,255,255,0.2);
        border-radius: 2px;
        margin: 0 auto 16px;
    }
    .popup .mob-actions-panel .buttons {
        display: flex !important;
        position: static !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        box-shadow: none !important;
        border: none !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    .popup .mob-panel-btn {
        width: 100% !important;
        height: 52px !important;
        border: none !important;
        border-radius: 12px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        cursor: pointer;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 0 10px 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
    .popup .mob-copy-caption {
        background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%) !important;
        color: white !important;
    }
    .popup .mob-share-btn {
        background: #F3F4F6 !important;
        color: #374151 !important;
    }
    .dark-mode .popup .mob-share-btn {
        background: #252547 !important;
        color: #D1D5DB !important;
    }
    .popup .mob-panel-separator {
        height: 1px;
        background: rgba(255,255,255,0.1);
        margin: 14px 0;
    }
    .mob-panel-separator + .buttons { margin-top: 0 !important; }

    /* Light mode separator */
    .popup .mob-panel-separator { background: rgba(0,0,0,0.08); }
    .dark-mode .popup .mob-panel-separator { background: rgba(255,255,255,0.1); }

    .popup .mob-actions-panel .button1,
    .popup .mob-actions-panel .button2,
    .popup .mob-actions-panel .button-download-all {
        flex: none !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 52px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .popup .mob-actions-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 199;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    .popup .mob-actions-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    /* Full width popup, no offset */
    .popup {
        padding: 0 !important;
    }
    .popup .mob-topbar .mob-user {
        font-weight: 600;
        font-size: 15px;
        color: rgba(255,255,255,0.9);
        text-decoration: none;
        max-width: 60%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .popup .imageContainer {
        width: 100% !important;
        height: auto !important;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0 !important;
        margin: 0 !important;
    }

    .popup .carousel-inner {
        width: 100% !important;
        height: auto !important;
        max-height: 65vh !important;
    }

    .popup .carousel-inner img,
    .popup .carousel-inner video {
        max-height: 65vh !important;
        object-fit: contain !important;
    }

    .popup .carousel {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .popup .captionContainer {
        display: none !important;
        width: 100% !important;
        margin: 15px 0 8px 0 !important;
        padding: 12px !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        max-height: calc(100vh - 55vh - 56px - 180px) !important;
    }

    .popup.has-download-all .captionContainer {
        display: none !important;
    }

    .popup .captionContainer p {
        margin: 0;
        color: white;
        font-size: 14px;
        line-height: 1.4;
        display: block;
    }

    .popup .buttons {
        width: 100%;
        position: fixed;
        bottom: 0;
        left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 15px 0;
        background-color: #0A0A2A;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }

    .popup .button1,
    .popup .button2 {
        flex: 0 1 45%;
        max-width: 45%;
        margin: 0 5px;
        padding: 15px 0;
        font-size: 16px;
    }
}

@media (max-width: 1000px) {
    .input-container input[type="text"],
    .input-container .send-button {
        display: none;
    }

    .paste-inline-btn { display: none !important; }
    .clear-input { display: none !important; }

    .input-container .paste-and-load-button {
        display: block;
        background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
        border: none;
        padding: 10px 20px;
        border-radius: 14px;
        color: white;
        cursor: pointer;
        height: 64px;
        font-weight: 800;
        width: 100%;
        font-size: 16px;
        margin-bottom: 16px;
        letter-spacing: 0.3px;
        box-shadow: 0 4px 18px rgba(99,102,241,0.35);
    }
    
    .paste-and-load-button:hover {
        transform: translateY(-2px); /* Leggero spostamento verso l'alto */
        box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15); /* Ombra più intensa */
    }

    .paste-and-load-button:active {
        transform: translateY(0); /* Ripristina posizione */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Ombra normale */
    }

    

   
    

  
    
    

}

@media (max-width: 768px) {
    .subscription-plans {
        flex-direction: column;
    }
    
    .plan-card.featured {
        transform: scale(1);
    }
    
    .plan-card.featured:hover {
        transform: translateY(-5px);
    }
    
    .user-profile-dropdown {
        width: 90%;
        right: 5%;
    }
}

@media (max-width: 768px) {

    .user-profile-button .user-name {
        display: none; /* Nascondi il nome utente su mobile */
    }

    .login-header-btn span {
        display: none; /* Nascondi il testo "Sign in" su mobile */
    }

    .login-header-btn {
        padding: 8px;
    }

    #userProfileDropdown {
        right: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }
}

@media (max-width: 768px) {
    #userProfileDropdown {
        right: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }
}

        @media (max-width: 576px) {
            .popup-content {
                padding: 25px 20px;
                width: 95%;
            }
            
            .login-benefits {
                grid-template-columns: 1fr;
            }
            
            .plan-card {
                padding: 25px 15px;
            }
        }

@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }
    .carousel-dots {
        bottom: 8px;
    }
}

        @media (max-width: 600px) {
            .step-arrow { display: none; }
            .welcome-step { max-width: 100%; min-width: 100%; }
            .welcome-steps { gap: 8px; }
        }

        @media (max-width: 600px) {
            .hero-section h1 { font-size: 22px; }
            .hero-sub { font-size: 14px; }
            .hero-trust { gap: 8px; }
            .hero-section { padding: 24px 16px 20px; }
        }

        @media (max-width: 1000px) {
            .input-wrapper { margin-right: 0; margin-bottom: 0; }
        }

        @media (max-width: 768px) {
            .repost-header {
                padding: 16px 15px !important;
            }
        }

@media (max-width: 768px) {
    .repost-item .rpi-delete,
    .repost-item:hover .rpi-delete,
    .repost-item .rpi-delete:hover {
        display: none !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
}

@media (min-width: 1001px) {
    .popup .mob-topbar { display: none !important; }
    .popup .mob-repost-trigger { display: none !important; }
    .popup .mob-actions-panel { display: none !important; }
    .popup .mob-actions-overlay { display: none !important; }
}

@media (max-width: 1000px) {
    .repost-title {
        padding-left: 8px !important;
    }
}

@media (max-width: 1000px) {
    .dark-mode .popup .watermark-controls {
        background-color: #1A1A3A !important;
        border-top-color: rgba(255,255,255,0.06) !important;
    }
    /* Light mode actions panel */
    .popup .mob-actions-panel {
        background: #fff;
    }
    .popup .mob-actions-panel .mob-actions-handle {
        background: rgba(0,0,0,0.15);
    }
    .dark-mode .popup .mob-actions-panel {
        background: #1A1A3A;
    }
}
