*{
    box-sizing:border-box;
    margin:0;
    padding:0;
    font-family:Arial, sans-serif;
}

body{
    background:#f2f2f2;
    overflow-x:hidden;
}

/* ===== SLIDER ===== */
.slideshow-container{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    z-index:-1;
}

.slide{
    position:absolute;
    width:100%;
    height:100%;
    background-size:cover;
    background-position:center;
    opacity:0;
    transition:opacity 1s;
}

.slide.active{opacity:1}

/* ===== HEADER ===== */
header{
    background:rgba(0,0,0,.75);
    color:#fff;
    padding:12px;
    text-align:center;
}

header img{
    height:160px;
    max-height:160px;
    width:auto;
    object-fit:contain;
}

header nav{
    margin-top:10px;
}

header nav a{
    color:#fff;
    text-decoration:none;
    margin:0 6px;
    font-size:14px;
}

/* ===== BUSCA ===== */
.busca{
    display:flex;
    gap:8px;
    padding:10px;
    margin:10px;
    background:#fff;
    border-radius:12px;
    box-shadow:0 3px 8px rgba(0,0,0,.15);
    overflow-x:auto;
}

.busca form{
    display:flex;
    gap:8px;
    width:100%;
}

.busca input{
    padding:8px 10px;
    border-radius:8px;
    border:1px solid #ccc;
}

.buscar-btn{
    padding:8px 14px;
    border-radius:20px;
    border:none;
    background:#28a745;
    color:#fff;
    font-weight:bold;
    cursor:pointer;
}

/* ===== LEGENDA ===== */
.legenda-slots{
    background:#fff;
    margin:0 10px 10px;
    padding:8px 12px;
    border-radius:10px;
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    font-size:12px;
    box-shadow:0 3px 8px rgba(0,0,0,.15);
}

.legenda-item{
    display:flex;
    align-items:center;
    gap:6px;
}

.legenda-cor{
    width:14px;
    height:14px;
    border-radius:4px;
}

.cor-disponivel{ background:#ff9800; }
.cor-selecionado{ background:#22c55e; }
.cor-pendente{ background:#2196f3; }
.cor-bloqueado{ background:#9e9e9e; }

/* ===== QUADRAS ===== */
.quadras{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
    padding:10px;
}

.card{
    background:#fff;
    border-radius:10px;
    padding:10px;
    border:1px solid #ddd;
}

.btn-horarios{
    margin-top:6px;
    padding:6px;
    font-size:12px;
    background:#28a745;
    color:#fff;
    border:none;
    border-radius:6px;
    cursor:pointer;
    width:100%;
}

/* ========================= */
/* ===== HORÁRIOS FIX ====== */
/* ========================= */

.horarios-container{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    grid-auto-flow: row;           /* força ordem por linha */
    align-content: start;          /* evita reordenação visual */
    gap:6px;
    margin-top:8px;
    padding:6px;
    max-height:160px;
    overflow-y:auto;
    background:#f3f3f3;
    border-radius:8px;
}

.horario-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    height:32px;
    font-size:12px;
    border-radius:6px;
    background:#ff9800;
    color:#fff;
    cursor:pointer;
    user-select:none;
    transition:0.15s;
    width:100%;
}

/* selecionado */
.horario-btn.selecionado{
    background:#22c55e;
}

.horario-btn.selecionado-final{
    background:#16a34a;
    border:2px solid #0f5132;
    font-weight:bold;
}

.horario-btn.pendente{
    background:#2196f3;
    cursor:not-allowed;
    pointer-events:none;
}

.horario-btn.bloqueado{
    background:#9e9e9e;
    color:#555;
    cursor:not-allowed;
    pointer-events:none;
}

.btn-reservar{
    display:none;
    margin-top:6px;
    padding:7px;
    background:#ff5722;
    color:#fff;
    border:none;
    border-radius:6px;
    cursor:pointer;
    width:100%;
}

.resumo{
    font-size:11px;
    margin-top:6px;
    font-weight:bold;
}

/* ===== WHATSAPP ===== */
.whatsapp-float{
    position:fixed;
    bottom:15px;
    right:15px;
    background:#25D366;
    color:#fff;
    padding:12px 16px;
    border-radius:8px;
    font-weight:bold;
    font-size:13px;
    display:flex;
    align-items:center;
    gap:6px;
    text-decoration:none;
    box-shadow:0 4px 10px rgba(0,0,0,.3);
    z-index:999;
}

.modal-bola{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-bola.ativo{
  display: flex;
}

.modal-conteudo{
  background: #fff;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  padding: 20px;
}

.modal-conteudo h3{
  margin-bottom: 10px;
}

.bola-item{
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.bola-item.selecionada{
  background: #e8f7ff;
  border-color: #2196f3;
}

.modal-acoes{
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.modal-acoes button{
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#confirmar-bola{
  background: #28a745;
  color: #fff;
}

#cancelar-bola{
  background: #ccc;
}
/* ===== MOBILE ===== */
@media(max-width:480px){
    header img{ height:140px; }
    .quadras{ grid-template-columns:1fr; }
}