/* ─── Plan a Ride button ─── */
#plan-ride-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  box-shadow: 0 2px 10px rgba(255, 95, 5, .35);
  flex-shrink: 0;
}

#plan-ride-btn:hover {
  background: #e85500;
  box-shadow: 0 4px 16px rgba(255, 95, 5, .5);
  transform: translateY(-1px);
}

/* ─── Plan a Ride modal ─── */
#ride-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 15, 35, 0.35);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

#ride-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#ride-modal {
  background: rgba(19, 41, 75, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(44, 78, 138, 0.4);
  border-radius: 16px;
  width: min(94vw, 860px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  overflow: hidden;
  transition: transform .3s ease;
}

#ride-modal-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

#ride-modal-hdr h2 {
  font-size: .95rem;
  font-weight: 700;
  flex: 1;
}

#ride-summary {
  font-size: .7rem;
  color: var(--text-dim);
}

#ride-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color .15s;
}

#ride-close:hover {
  color: var(--text);
}

#ride-save-wrap {
  position: relative;
}

#ride-save-btn {
  padding: 5px 13px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(255, 95, 5, .12);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

#ride-save-btn:hover {
  background: rgba(255, 95, 5, .22);
}

body.tut-visible #ride-overlay {
  align-items: flex-start;
  padding-top: 90px;
}

body.tut-visible #ride-modal {
  transform: translateY(-40px);
}

#ride-save-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: rgba(19, 41, 75, 0.97);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 10;
}

#ride-save-dropdown.open {
  display: flex;
}

.ride-save-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s;
}

.ride-save-opt:hover {
  background: var(--surface-2);
}

.ride-save-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.ride-save-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text);
}

.ride-save-sub {
  font-size: .65rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.ride-save-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 8px;
}

#ride-day-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}

#ride-day-tabs::-webkit-scrollbar {
  display: none;
}

.ride-day-tab {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}

.ride-day-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.ride-day-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 95, 5, .35);
}

#ride-schedule {
  overflow-y: auto;
  flex: 1;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#ride-schedule::-webkit-scrollbar {
  width: 4px;
}

#ride-schedule::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.ride-slot {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ride-slot-time {
  width: 96px;
  font-size: .6rem;
  color: var(--text-dim);
  padding-top: 8px;
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.ride-slot-swipe-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.ride-slot-delete-hint {
  position: absolute;
  inset: 0;
  background: rgba(190, 40, 40, .75);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 20px;
  color: rgba(255, 255, 255, .92);
  font-size: .82rem;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.ride-slot-replace-hint {
  position: absolute;
  inset: 0;
  background: rgba(0, 159, 212, .78);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 18px;
  color: rgba(255, 255, 255, .92);
  font-size: .8rem;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.ride-slot-card {
  width: 100%;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  transition: background .15s;
  border-left: 3px solid transparent;
  user-select: none;
}

.ride-slot-card:hover {
  background: var(--surface-3, #243d6b);
}

.ride-slot-card.mandatory {
  border-left-color: var(--accent);
  background: rgba(255, 95, 5, .06);
  border-color: rgba(255, 95, 5, .25);
}

.ride-slot-card.mandatory:hover {
  background: rgba(255, 95, 5, .1);
}

.ride-slot-card.suggested {
  border-left-color: var(--accent-2);
  background: rgba(0, 159, 212, .04);
}

.ride-slot-card.suggested:hover {
  background: rgba(0, 159, 212, .09);
}

.ride-slot-title {
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 5px;
}

.ride-slot-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ride-slot-tag {
  font-size: .6rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(44, 78, 138, .4);
  color: var(--text-dim);
}

.ride-slot-tag.pinned-tag {
  background: rgba(255, 95, 5, .18);
  color: var(--accent);
  font-weight: 600;
}

/* Clickable room tag (pin button) */
button.ride-slot-room-btn {
  font-size: .6rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(44, 78, 138, .4);
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}

button.ride-slot-room-btn:hover {
  background: rgba(44, 78, 138, .75);
  color: var(--text);
}
