/* =========================================================
   MÓDULO ESCOLHA DO X
   ========================================================= */

/* --- Linha da tabela --- */
.linha-escolha-x td { padding: 0 !important; border-top: 2px dashed #ff9800; }
.escolha-x-vazia   { background: transparent !important; border: none !important; }
.escolha-x-cell    { text-align: center; padding: 12px 8px !important; background: #fff8f0 !important; }

/* --- Wrap --- */
.escolha-x-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* --- Botão principal --- */
.btn-abrir-modal-x {
    background: #ff9800; color: #fff; border: none; border-radius: 6px;
    padding: 8px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
    transition: background .2s, transform .15s; white-space: nowrap;
}
.btn-abrir-modal-x:hover { background: #e65100; transform: translateY(-1px); }

/* --- Estado confirmado --- */
.x-confirmado-badge {
    background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7;
    border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 700;
}
.x-confirmado-badge .emoji{ width: 7%;}
.x-horario-confirmado { font-size: 13px; color: #555; }
.x-horario-confirmado .emoji{width: 7%;}

.x-acoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/*.btn-trocar-horario-x, .btn-cancelar-x .emoji {width: 7%;}*/
.btn-trocar-horario-x, .btn-cancelar-x {
    border: none; border-radius: 5px; padding: 5px 12px;
    font-size: 12px; font-weight: 600; cursor: pointer; transition: opacity .2s;
}
.btn-trocar-horario-x { background: #1976d2; color: #fff; }
.btn-trocar-horario-x:hover { opacity: .85; }
.btn-cancelar-x { background: #f5f5f5; color: #d32f2f; border: 1px solid #e0e0e0; }
.btn-cancelar-x:hover { background: #ffebee; }

.x-contador { font-size: 11px; color: #999; }
.x-count    { font-weight: 700; color: #e65100; }

/* Login hint */
.escolha-x-login { font-size: 12px; color: #888; font-style: italic; padding: 8px 4px; }
.escolha-x-login a { color: #1976d2; }

/* =========================================================
   MODAL
   ========================================================= */
.modal-x-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    z-index: 99990; display: flex; align-items: center; justify-content: center;
    padding: 16px;
}

.modal-x-box {
    background: #fff; border-radius: 12px; padding: 28px 28px 24px;
    max-width: 440px; width: 100%; position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    animation: modalSlideIn .2s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-x-fechar {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; font-size: 18px;
    cursor: pointer; color: #999; line-height: 1;
}
.modal-x-fechar:hover { color: #333; }

.modal-x-header {
    display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
}
.modal-x-icon  { font-size: 36px; }
.modal-x-titulo { font-size: 20px; font-weight: 700; color: #0d2f6e; }
.modal-x-subtitulo { font-size: 13px; color: #888; margin-top: 2px; }

.modal-x-usuario {
    background: #f5f5f5; border-radius: 6px; padding: 10px 14px;
    font-size: 13px; color: #555; margin: 0 0 18px 0;
}

.modal-x-label { font-size: 14px; font-weight: 600; color: #333; display: block; margin-bottom: 10px; }

.modal-x-horarios {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}

.btn-horario-x {
    background: #f0f4ff; border: 2px solid #c5cae9; border-radius: 8px;
    padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
    color: #1976d2; transition: all .15s;
}
.btn-horario-x:hover   { background: #e3f2fd; border-color: #1976d2; }
.btn-horario-x.ativo   { background: #1976d2; border-color: #1976d2; color: #fff; }

.modal-x-horario-selecionado {
    font-size: 13px; color: #555; margin-bottom: 4px;
    background: #e8f5e9; border-radius: 5px; padding: 7px 12px;
}

.modal-x-footer {
    display: flex; gap: 12px; align-items: center; margin-top: 20px;
    border-top: 1px solid #f0f0f0; padding-top: 18px;
}

.btn-confirmar-x {
    background: #2e7d32; color: #fff; border: none; border-radius: 7px;
    padding: 10px 22px; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background .2s; flex: 1;
}
.btn-confirmar-x:hover:not(:disabled) { background: #1b5e20; }
.btn-confirmar-x:disabled { opacity: .45; cursor: not-allowed; }

.btn-cancelar-modal {
    background: none; border: 1px solid #ddd; border-radius: 7px;
    padding: 10px 18px; font-size: 14px; color: #777; cursor: pointer;
}
.btn-cancelar-modal:hover { background: #f5f5f5; }

.modal-x-msg {
    margin-top: 14px; padding: 10px 14px; border-radius: 6px;
    font-size: 13px; text-align: center;
}
.modal-x-msg.sucesso { background: #e8f5e9; color: #2e7d32; }
.modal-x-msg.erro    { background: #ffebee; color: #c62828; }

/* Toast global */
.cardapio-x-toast {
    position: fixed; bottom: 28px; left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #333; color: #fff; padding: 12px 24px;
    border-radius: 8px; font-size: 14px; z-index: 99999;
    opacity: 0; transition: opacity .3s, transform .3s;
    max-width: 92vw; text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.3); pointer-events: none;
}
.cardapio-x-toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }
.cardapio-x-toast.sucesso { background: #2e7d32; }
.cardapio-x-toast.aviso   { background: #e65100; }
.cardapio-x-toast.erro    { background: #c62828; }

/* Impressão: oculta tudo do X */
@media print {
    .no-print, .linha-escolha-x, .modal-x-overlay { display: none !important; }
}

/* --- Estado: prazo encerrado --- */
.x-estado-encerrado { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.x-encerrado-badge {
    background: #f5f5f5; color: #9e9e9e;
    border: 1px solid #e0e0e0; border-radius: 6px;
    padding: 6px 12px; font-size: 12px; font-weight: 600;
}
.x-encerrado-badge .emoji{
    width: 7%;
}

.x-encerrado-aviso {
    font-size: 11px; color: #bbb; text-align: center; margin-top: 2px;
}
.x-encerrado-aviso .emoji {width:7%;}

