/* Admin/Frontend base styles */
.acal-wrap h1 { margin-bottom: 8px; }
.acal-topbar { display:flex; flex-direction:column; gap:10px; margin:8px 0 12px; }
.acal-topbar .acal-nav { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.acal-filters label { margin-right:12px; }
.acal-legend { margin: 8px 0 12px; display:flex; gap:8px; flex-wrap:wrap; }
.acal-pill { padding:4px 10px; border-radius:999px; color:#fff; background:var(--pill-bg,#666); font-size:12px; }

.acal-grid { display:grid; grid-template-columns: 200px repeat(5, 1fr); border:1px solid #e7e9ef; border-radius:8px; overflow:hidden; }
.acal-cell { border-right:1px solid #eef1f5; border-bottom:1px solid #eef1f5; padding:8px; min-height:90px; background:#fff; }
.acal-head { background:#f8fafc; color:#2c3338; font-weight:600; text-align:center; padding:4px 6px; font-size:12.5px; line-height:1.1; min-height:28px; display:flex; justify-content:space-between; align-items:center; }
.acal-tech-col { background:#f7f8fa; min-width:200px; }
.acal-techname { color:#111; font-weight:700; padding:6px 8px; border-radius:6px; text-align:center; }

/* Show +Agregar only on hover in grid cells */
.wp-admin .acal-wrap .acal-cell{ position:relative; padding-top:8px; }
.wp-admin .acal-wrap .acal-cell.acal-head{ padding-top:8px; }
.acal-grid .acal-cell .acal-add{ position:absolute; top:6px; right:6px; z-index:5; }
.acal-grid .acal-cell > .acal-add.acal-hide{ opacity:0; pointer-events:none; transition:opacity .12s; }
.acal-grid .acal-cell:hover > .acal-add.acal-hide{ opacity:1; pointer-events:auto; }

.acal-task { background:#fff; border:1px solid #eaecef; border-left:4px solid #999; border-radius:8px; padding:8px 10px; margin:8px 0; box-shadow:0 1px 2px rgba(0,0,0,.03); position:relative; }
.acal-task-title { font-weight:700; margin-bottom:2px; }
.acal-task-meta { color:#6b7280; font-size:12px; margin-bottom:4px; }
.acal-task-badges .badge { font-size:11px; background:#eef2f7; color:#374151; border-radius:999px; padding:2px 8px; display:inline-block; }
.acal-kebab-wrap { position:absolute; top:6px; right:6px; }
.acal-kebab { padding:0 6px; height:22px; line-height:20px; font-size:16px; }

/* Modal */
.acal-modal { position:fixed; inset:0; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; z-index:100000; }
.acal-modal-content { background:#fff; width:680px; max-width:95vw; border-radius:10px; padding:16px 18px; box-shadow:0 20px 60px rgba(0,0,0,.2); }
.acal-modal-close { float:right; cursor:pointer; font-size:24px; }
#acal-form label { display:block; font-weight:600; margin:8px 0 4px; }
#acal-form input[type="text"], #acal-form input[type="date"], #acal-form select, #acal-form textarea { width:100%; }
#acal-form .acal-form-actions { margin-top:12px; display:flex; justify-content:flex-end; }

/* Técnicos */
.widefat .acal-dot { display:inline-block; width:16px; height:16px; border-radius:999px; margin-right:6px; vertical-align:middle; }
button.button-link-delete { color:#b32d2e; }
.acal-hex{width:110px; font-family:monospace;}

/* Export button style */
.acal-head .acal-export{font-size:11px;line-height:1.2;padding:2px 6px}

/* ===== HOTFIX grid & layout (integrado) ===== */
.acal-grid{
  display:grid !important;
  grid-template-columns: 200px repeat(5, 1fr) !important; /* L–V */
  grid-auto-flow: row;
  align-items: start;
  box-sizing: border-box;
}
.acal-grid .acal-cell{
  position: relative;
  box-sizing: border-box;
  min-height: 90px;
  background: #fff;
  border-right: 1px solid #eef1f5;
  border-bottom: 1px solid #eef1f5;
}
.acal-tech-col{
  background: #f7f8fa !important;
}
.acal-tech-col .acal-techname{
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  overflow: hidden; /* evita sangrado */
}
.acal-grid .acal-cell .acal-add{
  position: absolute;
  top: 6px; right: 6px;
}
/* Admin padding */
.wp-admin .acal-wrap .acal-cell{ padding-top: 8px !important; }
.wp-admin .acal-wrap .acal-cell.acal-head{ padding-top: 8px !important; }
