/* =============================================================================
   PORTAL DO CIDADÃO - NOVA PETRÓPOLIS/RS
   ARQUIVO: css/componentes.css (Overlay Cadastro, Modal Sucesso e Responsivo)
   ============================================================================= */

/* JANELA FLUTUANTE EM TELA CHEIA PARA PREENCHIMENTO DE CADASTRO */
#cadastro-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0f111a;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.overlay-header {
    background-color: #11131c;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px)) !important;
    border-bottom: 1px solid #2d323f;
}

.overlay-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    -webkit-overflow-scrolling: touch;
}

/* ESTILOS PREMIUM DO NOVO MODAL DE SUCESSO FLUTUANTE */
#modal-sucesso-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20000;
}

.modal-sucesso-backdrop {
    width: 100%;
    height: 100%;
    background-color: rgba(15, 17, 26, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.modal-sucesso-card {
    background-color: #1a1d26;
    border: 2px solid #ffd600;
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    padding: 24px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

/* TOAST DE ERRO FLUTUANTE NO BOTTOM */
.toast-container-custom {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 30000;
    width: calc(100% - 32px);
    max-width: 440px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.toast-card {
    background-color: #3d1f1f;
    border: 1.5px solid #ff5a5f;
    color: #ffdae0;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.55);
    pointer-events: auto;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.toast-card.success-toast {
    background-color: #143d2c;
    border-color: #198754;
    color: #e3f9f0;
}

/* 📱 ADAPTAÇÃO MOBILE DO PORTAL DO CIDADÃO */
@media (max-width: 768px) {
    #main-container {
        flex-direction: column-reverse;
    }
    #sidebar {
        width: 100%;
        min-width: 100%;
        height: 56vh;
        border-right: none;
        border-top: 1px solid #2d323f;
    }
    .sidebar-header {
        padding: 10px 15px !important;
    }
    .sidebar-header small {
        display: none !important;
    }
    .sidebar-content {
        padding: 12px 15px !important;
        overflow-y: auto !important;
    }
    #passo-instrucao i {
        font-size: 2.2rem !important;
    }
    .overlay-header {
        padding: 10px 12px !important;
        padding-top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    }
    .overlay-header h5 {
        font-size: 1.05rem !important;
        white-space: nowrap;
    }
    .overlay-header small {
        font-size: 0.72rem !important;
        white-space: nowrap;
    }
    .overlay-header button {
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
        white-space: nowrap;
    }
    #passo-formulario .p-3 {
        padding: 10px 12px !important;
    }
    #passo-formulario span {
        font-size: 0.72rem !important;
    }
    #btn-enviar {
        font-size: 0.88rem !important;
        padding: 12px !important;
        white-space: nowrap;
    }
}
