/* =======================================================
   CALENDARIO DE DISPONIBILIDAD
   Archivo: style.css
   Enfoque: Mobile-first + responsive
   ======================================================= */

:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --accent: #4caf50;
  --accent-dark: #388e3c;
  --text: #222;
  --text-muted: #666;
  --border: #e0e0e0;
  --radius: 12px;
  --shadow: 0 4px 10px rgba(0,0,0,0.05);
  --transition: 0.25s ease;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  padding: 16px;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

h1, h2, h3 {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--text);
}

p {
  margin: 0 0 10px;
  color: var(--text-muted);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.btn {
  display: inline-block;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn:hover {
  background: #f1f1f1;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.small {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

label {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="color"],
select {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
}

input[type="color"] {
  padding: 2px;
  height: 36px;
}

textarea {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 8px;
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

/* --- CALENDARIO --- */
#calendarGrid {
  overflow-x: auto;
  margin-top: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.calendar-day {
  background: var(--card);
  border-radius: var(--radius);
  padding: 8px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: var(--shadow);
}

.calendar-day strong {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
}

.slot {
  border-radius: var(--radius);
  padding: 4px 6px;
  color: #fff;
  font-size: 0.8rem;
  margin-bottom: 4px;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.availRow {
  border-left: 3px solid var(--accent);
  background: #f9f9f9;
  padding: 6px;
  border-radius: var(--radius);
  margin-top: 8px;
}

.availRow input {
  flex: 1;
}

/* --- RESPONSIVE --- */
@media (min-width: 768px) {
  body {
    padding: 24px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .card {
    padding: 20px;
  }
}


/* Ajustar textarea de enlace en móvil */
#calendarLink {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box; /* importante para padding */
  overflow-x: auto; /* permite scroll horizontal si hace falta */
  word-wrap: break-word; /* opcional: fuerza salto de línea si se quiere */
  font-size: 0.9em;
  padding: 6px;
}