/* Estilos Personalizados e Responsivos para o Conversor Web-to-APK */

/* Ícones compactos nos controles; a área clicável dos botões é preservada. */
.preview-controls .material-symbols-outlined {
    font-size: 14px !important;
    line-height: 1 !important;
}

@media (max-width: 420px) {
    .preview-controls .material-symbols-outlined {
        font-size: 13px !important;
    }
}

/* Mockup de Smartphone Responsivo */
.phone-mockup {
    width: 100%;
    max-width: 360px;
    height: 720px;
    background: #090d16;
    border-radius: 44px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), inset 0 0 0 3px rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
}

/* Tamanho Ultra 412x915 */
.phone-mockup.mode-ultra {
    max-width: 412px;
    height: 800px;
}

/* Modo Paisagem (Landscape) */
.phone-mockup.mode-landscape {
    max-width: 740px;
    height: 400px;
    border-radius: 36px;
}

.phone-mockup.mode-landscape.mode-ultra {
    max-width: 840px;
    height: 430px;
}

/* Ajuste Fino para Telas Mobile Pequenas (< 420px) */
@media (max-width: 420px) {
    .phone-mockup {
        max-width: 100%;
        height: 600px;
        border-radius: 34px;
        padding: 8px;
    }

    .phone-mockup.mode-ultra {
        max-width: 100%;
        height: 650px;
    }

    .phone-screen {
        border-radius: 26px !important;
    }

    .phone-notch {
        width: 75px !important;
        height: 14px !important;
    }

    .phone-statusbar {
        height: 24px !important;
        padding: 0 12px !important;
        font-size: 10px !important;
    }
}

.phone-screen {
    flex: 1;
    background: #ffffff;
    border-radius: 34px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.phone-notch {
    width: 85px;
    height: 16px;
    background: #090d16;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    margin: 0 auto;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
}

.phone-statusbar {
    height: 26px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    z-index: 20;
    transition: background 0.3s ease;
    user-select: none;
}

.phone-content {
    flex: 1;
    position: relative;
    background: #f8fafc;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.phone-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.phone-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.phone-content iframe::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Splash Screen Personalizada */
.phone-splash {
    position: absolute;
    inset: 0;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
    user-select: none;
    padding: 20px;
    text-align: center;
}

/* Animações de Splash */
.phone-splash.anim-zoom {
    transform: scale(1);
}
.phone-splash.anim-zoom.opacity-0 {
    transform: scale(1.15);
}

.phone-splash.anim-slide {
    transform: translateY(0);
}
.phone-splash.anim-slide.opacity-0 {
    transform: translateY(-100%);
}

/* Barra Linear de Splash Loader */
.splash-linear-loader {
    width: 110px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.splash-linear-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: #ffffff;
    border-radius: 99px;
    animation: linearProgress 1.4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Notificação Push Simulada */
.phone-push-notification {
    position: absolute;
    top: -120px;
    left: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 10px 12px;
    color: white;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.6), 0 0 15px rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(12px);
    z-index: 40;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.phone-push-notification.show-push {
    transform: translateY(132px);
}

/* Diálogo de Permissão Android 14 */
.phone-permission-dialog {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 45;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.phone-permission-dialog.show-dialog {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.phone-permission-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 18px;
    width: 100%;
    color: #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.phone-permission-dialog.show-dialog .phone-permission-card {
    transform: translateY(0);
}

/* Toast Android Nativo */
.phone-toast {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 41, 59, 0.95);
    color: #f8fafc;
    font-size: 11px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 99px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.phone-toast.show-toast {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Barra de Navegação Clássica Android (3 Botões) */
.phone-nav-bar {
    height: 34px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
    color: #64748b;
    user-select: none;
    z-index: 20;
}

.phone-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 26px;
    border-radius: 8px;
    transition: background 0.2s;
}

.phone-nav-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Estilos das Abas do Formulário */
.form-tab-btn.active-tab {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    border-color: transparent;
}
