/* ============================================
   agenda.css — v7.1.0
   Header compacto + estilos específicos agenda
   ============================================ */

/* --- Header compacto v3 --- */
.hl-agenda-header-v3 {
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: #fff;
  border-bottom: 1px solid #e6e9ef;
  /* Flush con navbar: sin margin, sin border-radius, sin shadow */
}

.hl-ah-date-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hl-ah-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.hl-ah-arrow:hover {
  background: #f5f7fb;
  border-color: #adb5bd;
}

.hl-ah-date-label {
  font-size: 14px;
  font-weight: 500;
  color: #212529;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.hl-ah-date-label:hover {
  color: #0d6efd;
}

.hl-ah-today {
  height: 28px;
  border-radius: 14px;
  border: 1px solid #0d6efd;
  background: #fff;
  color: #0d6efd;
  font-size: 11px;
  font-weight: 500;
  padding: 0 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hl-ah-today:hover {
  background: #e7f1ff;
}

.hl-ah-view-toggle {
  display: flex;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
}

.hl-ah-view-pill {
  padding: 4px 16px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  color: #6c757d;
  border: none;
  transition: all 0.15s ease;
}
.hl-ah-view-pill:hover:not(.active) {
  background: #f5f7fb;
}
.hl-ah-view-pill.active {
  background: #0d47a1;
  color: #fff;
}

.hl-ah-spacer {
  flex: 1;
}

.hl-ah-filters {
  display: flex;
  align-items: center;
}

.hl-ah-select {
  height: 28px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 11px;
  color: #555;
  background: #fff;
  min-width: 110px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236c757d' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 22px;
}
.hl-ah-select:focus {
  border-color: #0d6efd;
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.hl-ah-new-btn {
  height: 30px;
  border-radius: 6px;
  background: #0d47a1;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 500;
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.hl-ah-new-btn:hover {
  background: #1565c0;
}

.hl-ah-gear {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #adb5bd;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
}
.hl-ah-gear:hover {
  color: #6c757d;
  background: #f5f7fb;
}

/* --- View controls: display:contents para flex passthrough --- */
.hl-view-controls {
  display: contents;
}
.hl-view-controls[hidden] {
  display: none;
}

/* --- Date input compacto (daily view) --- */
.hl-ah-date-input {
  height: 28px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: #212529;
  background: #fff;
  cursor: pointer;
}
.hl-ah-date-input:focus {
  border-color: #0d6efd;
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

/* --- Gear dropdown overrides --- */
#agenda-gear-menu .status-filter-item {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
}
#agenda-gear-menu .status-filter-item:hover {
  background: #f5f7fb;
}

/* --- Daily appointment cards compactas v7.1.0 --- */
#daily-appointments-container {
  padding-top: 0.5rem;
}

#daily-appointments-container .appointment-card {
  font-size: 0.82rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#daily-appointments-container .appointment-card .card-body {
  padding: 0.65rem 0.85rem;
}

#daily-appointments-container .appointment-card .card-title {
  font-size: 0.88rem;
  font-weight: 600;
}

#daily-appointments-container .appointment-card hr {
  margin: 0.4rem 0;
}

#daily-appointments-container .appointment-info p {
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

#daily-appointments-container .appointment-info strong {
  font-weight: 500;
}

#daily-appointments-container .appointment-card .btn {
  min-height: 32px;
  height: 32px;
  font-size: 0.78rem;
  padding: 0 0.65rem;
}

#daily-appointments-container .appointment-card .btn-whatsapp-card {
  width: 32px;
  min-width: 32px;
  padding: 0;
}

/* 4 columns on xl, 3 on lg, 2 on md (override app.js col-lg-4) */
@media (min-width: 1400px) {
  #daily-appointments-container > .col-lg-4 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* --- Mobile header compacto --- */
.hl-agenda-header-mobile {
  background: #fff;
  border-bottom: 1px solid #e6e9ef;
  padding: 8px 12px;
  position: sticky;
  top: 56px;
  z-index: 1020;
}

.hl-ahm-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hl-ahm-filters-row {
  margin-top: 4px;
  gap: 6px;
  overflow: visible;
}

.hl-ahm-filters-row .flex-grow-1 {
  min-width: 0;
  max-width: 50%;
}

.hl-ahm-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hl-ahm-date {
  font-size: 12px;
  font-weight: 500;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.hl-ahm-today {
  height: 26px;
  border-radius: 13px;
  border: 1px solid #0d6efd;
  background: #fff;
  color: #0d6efd;
  font-size: 10px;
  font-weight: 500;
  padding: 0 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.hl-ahm-today:hover {
  background: #e7f1ff;
}

.hl-ahm-new-btn {
  height: 28px;
  border-radius: 6px;
  background: #0d47a1;
  color: #fff;
  border: none;
  font-size: 11px;
  font-weight: 600;
  padding: 0 10px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}
.hl-ahm-new-btn:hover {
  background: #1565c0;
}

.hl-ahm-toggle {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hl-ahm-select {
  height: 26px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0 20px 0 8px;
  font-size: 10px;
  color: #555;
  background: #fff;
  width: 100%;
  max-width: 100%;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 16 16'%3E%3Cpath fill='%236c757d' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

.hl-ahm-select option {
  font-size: 11px;
  padding: 4px 8px;
}

/* --- Responsive: tablet squeeze --- */
@media (min-width: 768px) and (max-width: 1199px) {
  .hl-agenda-header-v3 {
    gap: 6px;
    padding: 8px 10px;
  }
  .hl-ah-today {
    padding: 0 10px;
  }
  .hl-ah-view-pill {
    padding: 4px 10px;
    font-size: 10px;
  }
  .hl-ah-select {
    min-width: 90px;
    font-size: 10px;
  }
  .hl-ah-new-btn {
    padding: 0 10px;
    font-size: 11px;
  }
}

/* ============================================
   Daily Grid Mobile v7.1.0
   ============================================ */
.hl-daily-grid {
  border-top: 1px solid #e6e9ef;
}

.hl-dg-row {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
}

.hl-dg-time {
  width: 50px;
  flex-shrink: 0;
  padding: 4px 6px 0 0;
  text-align: right;
  font-size: 11px;
  color: #9e9e9e;
  border-right: 1px solid #e6e9ef;
}

.hl-dg-cell {
  flex: 1;
  position: relative;
}

.hl-dg-working {
  background: #fffdf5;
}

.hl-dg-item {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 3px;
  padding: 4px 6px;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  transition: filter 0.15s ease;
}

.hl-dg-item:hover {
  filter: brightness(0.95);
}

.hl-dg-pet {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hl-dg-owner {
  font-size: 0.7rem;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Desktop: daily grid nunca visible */
@media (min-width: 768px) {
  #daily-grid-container { display: none !important; }
}
