/* Estilos Globais e Reset */
body { 
    background-color: #f4f7f6; 
    min-height: 100vh; 
    font-family: sans-serif; 
    /* Impede que o fundo branco apareça atrás do notch no iPhone */
    background-color: #212529; 
    padding-bottom: 90px !important; /* Espaço para a Tab Bar */
}

.card { border: none; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.fw-bold { font-weight: 700 !important; }

/* Permite o comportamento de puxar para atualizar no mobile */
html, body {
    overscroll-behavior-y: contain; 
    height: 100%;
}

/* Navbar e Notch do iPhone */
.navbar {
    padding-top: env(safe-area-inset-top) !important;
    background-color: #212529 !important;
}

.navbar-brand {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

/* Estilos do Painel Admin */
.barbeiro-section { 
    background: white; 
    padding: 20px; 
    border-radius: 12px; 
    margin-bottom: 20px; 
    border-left: 5px solid #212529; 
}

/* Agenda e Slots */
.d-flex.flex-wrap.gap-2 {
    justify-content: flex-start !important;
    gap: 8px !important;
}

.slot-hora {
    cursor: pointer;
    border: 1px solid #dee2e6;
    flex: 0 0 calc(25% - 8px); 
    min-width: 70px; 
    max-width: 90px;
    text-align: center;
    font-weight: bold;
    padding: 10px 0;
    border-radius: 8px;
    font-size: 0.85rem;
}

.status-livre { background-color: #d1e7dd; color: #0f5132; }
.status-ocupado { background-color: #f8d7da; color: #842029; opacity: 0.7; }

/* Bot WhatsApp */
.qr-container { 
    background: #f8f9fa; 
    border: 2px dashed #dee2e6; 
    border-radius: 15px; 
    padding: 15px; 
    text-align: center; 
    min-height: 160px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-direction: column; 
}

/* Estilo dos itens da Tab Bar (Mais compactos) */
.nav-item-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: 0.2s;
    flex: 1;
    padding: 5px 0; /* Espaçamento interno vertical */
    line-height: 1.1; /* Diminui o espaço entre as linhas de texto/emoji */
}

.nav-item-tab span { 
    font-size: 1.2rem; /* Tamanho do emoji levemente menor */
    margin-bottom: -2px; /* Puxa a palavra para cima, mais perto do emoji */
}

.nav-item-tab small { 
    font-size: 0.65rem; 
    font-weight: 500;
}

/* Destaque para a aba ativa */
.nav-item-tab.active {
    color: #ffc107 !important;
}
.nav-item-tab.active small {
    color: #ffc107 !important;
}


/* Responsividade Mobile */
@media (max-width: 576px) {
    .container { padding-left: 10px; padding-right: 10px; }
    
    #containerAgendaGeral {
        max-height: none !important;
        overflow: visible !important;
    }

    .barbeiro-section {
        padding: 15px 8px !important; 
        margin-left: -5px;
        margin-right: -5px;
    }

    .card-body {
        padding: 10px 5px !important;
    }

    #modalAgendamento, #modalAssinatura, #modalDetalhes {
        z-index: 99999 !important;
    }
}

/* Efeito de Pulso para o ícone de informação do dono */
.pulse-info {
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(13, 110, 253, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

/* 1. RESET PARA PC (Largura controlada e centralizado) */
@media (min-width: 769px) {
    .modal.bottom-sheet .modal-dialog {
        max-width: 450px !important; /* Não deixa esticar no monitor */
        margin: 1.75rem auto !important;
        display: flex !important;
        align-items: center !important;
        min-height: calc(100% - 3.5rem) !important;
    }
    .modal.bottom-sheet .modal-content {
        border-radius: 20px !important; /* Bordas normais no PC */
        box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
    }
    .drawer-handle {
        display: none !important; /* Esconde a alça no PC */
    }
}

/* 2. MODO CELULAR (Gaveta que sobe) */
@media (max-width: 768px) {
    .modal.bottom-sheet .modal-dialog {
        margin: 0 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }
    .modal.bottom-sheet.show .modal-dialog {
        transform: translateY(0) !important;
    }
    .modal.bottom-sheet .modal-content {
        border-radius: 25px 25px 0 0 !important;
    }
    .drawer-handle {
        display: block !important;
    }
}

/* Estilo da alcinha cinza */
.drawer-handle {
    width: 40px;
    height: 5px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 12px auto;
}