/* TradeRailPR228 — Day View Drag + Photo + Daily Report + PR229 Month Improvements */

/* ── Day view drag-to-reschedule ───────────────────────────────────────────── */

/* Make job blocks draggable visually */
.p226-day-job-block[draggable="true"] {
  cursor: grab;
  transition: opacity 0.15s, box-shadow 0.15s;
}
.p226-day-job-block[draggable="true"]:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
}
.p228-day-dragging {
  opacity: 0.45;
  cursor: grabbing !important;
}

/* Hour body drop zones */
.p228-hour-drop-active {
  background: rgba(255, 107, 0, 0.04);
  transition: background 0.12s;
}
.p228-hour-drop-target {
  background: rgba(255, 107, 0, 0.12) !important;
  border: 1.5px dashed #FF6B00 !important;
  border-radius: 6px;
}

/* ── Photo upload button ────────────────────────────────────────────────────── */

.p228-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  cursor: pointer;
  color: #374151;
  line-height: 1.4;
  transition: background 0.12s, border-color 0.12s;
}
.p228-photo-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.p228-photo-btn:active {
  background: #e5e7eb;
}

/* Mobile: larger tap area */
@media (max-width: 767px) {
  .p228-photo-btn {
    padding: 5px 12px;
    font-size: 12px;
  }
}

/* ── Daily report view button ───────────────────────────────────────────────── */

.p228-rpt-btn {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  background: #f0fdf4;
  border: 1px solid #16a34a;
  border-radius: 5px;
  color: #166534;
  cursor: pointer;
  transition: background 0.12s;
}
.p228-rpt-btn:hover {
  background: #dcfce7;
}

/* ── Modal overlay (shared) ─────────────────────────────────────────────────── */

.p228-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.p228-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  display: flex;
  flex-direction: column;
}

.p228-modal-hdr {
  padding: 18px 20px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}

.p228-modal-body {
  padding: 16px 20px;
  flex: 1;
  font-size: 13px;
  color: #374151;
}

.p228-modal-body p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.p228-modal-actions {
  padding: 14px 20px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Shared button styles ───────────────────────────────────────────────────── */

.p228-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s;
  line-height: 1.4;
}
.p228-btn-primary {
  background: #FF6B00;
  color: #fff;
}
.p228-btn-primary:hover {
  background: #e05a00;
}
.p228-btn-ghost {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.p228-btn-ghost:hover {
  background: #e5e7eb;
}

/* ── Daily report modal ─────────────────────────────────────────────────────── */

.p228-rpt-modal {
  max-width: 600px;
}

.p228-rpt-stat-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}

.p228-rpt-stat {
  font-size: 12px;
  color: #6b7280;
}
.p228-rpt-stat b {
  color: #111827;
}

.p228-rpt-status-badge {
  background: #f3f4f6;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.p228-rpt-section-hdr {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin: 14px 0 4px;
}

.p228-rpt-crew,
.p228-rpt-notes,
.p228-rpt-lily {
  font-size: 13px;
  color: #374151;
  line-height: 1.55;
}

.p228-rpt-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.p228-rpt-photo-chip {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 11px;
  color: #374151;
}

.p228-rpt-no-photos {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

/* ── PR229: Capacity dot strip on month cells ───────────────────────────────── */

.p228-dot-strip {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  margin-top: 2px;
}

.p228-cap-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.p228-cap-dot-more {
  font-size: 9px;
  color: #6b7280;
  font-weight: 600;
  line-height: 1;
  margin-left: 1px;
}

/* Month cell: make date row flex so dots align beside date number */
.p226-mcal-date-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .p228-modal {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    margin: 0;
  }
  .p228-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .p228-rpt-stat-row {
    flex-direction: column;
    gap: 6px;
  }
}
