/* /public/postmatched.css */

/* ---------------------------------
 * Scrolling Reminder Bar
 * --------------------------------- */
#scrolling-reminder-bar {
  background-color: #fff8e1; /* Light yellow */
  color: #855b00;
  border-bottom: 1px solid #ffeec2;
  padding: 0.5rem 0;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
  display: none; /* Hidden by default, shown by JS */
}

#scrolling-reminder-bar p {
  margin: 0;
  padding-left: 100%; /* Start off-screen */
  display: inline-block;
  animation: scroll-left 20s linear infinite;
  font-weight: 500;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ---------------------------------
 * Post-Match Calendar
 * --------------------------------- */
#calendar-root {
  font-size: 0.9rem;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.25rem;
}

.calendar-header h3 {
  margin: 0;
  font-size: 1.25rem;
  text-align: center;
  flex-grow: 1;
}

.calendar-nav {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  user-select: none;
}
.calendar-nav:hover {
  background: var(--border-color);
}
.calendar-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--border-color);
}

.calendar-day-header {
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 0.25rem;
  background: var(--secondary-bg);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  min-height: 90px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0.25rem 0.25rem 0.25rem;
}

.calendar-day.other-month {
  background-color: var(--secondary-bg);
  opacity: 0.6;
}

.calendar-day.today .day-number {
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
}

.day-number {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  width: 1.5rem;
  height: 1.5rem;
  text-align: center;
  line-height: 1.5rem;
}

.calendar-ride {
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  margin-bottom: 0.25rem;
  cursor: pointer;
  border: 1px solid;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status: accepted (Default, needs confirmation) */
.calendar-ride-accepted {
  background-color: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
}
.calendar-ride-accepted:hover {
  background-color: #fff3cd; /* Lighter yellow */
}

/* Status: confirmed (To be fulfilled) */
/* Status: onTheWay (Driver navigating) */
.calendar-ride-confirmed {
  background-color: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}
.calendar-ride-confirmed:hover {
  background-color: #d1e7dd; /* Lighter green */
}

/* --- NEW: Status: in_progress (Driver has rider in car) --- */
.calendar-ride-in-progress {
  background-color: #e6f2ff; /* Light blue */
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600; /* Make it stand out */
}
.calendar-ride-in-progress:hover {
  background-color: #dbeaff;
}

/* --- NEW: Status: payment_pending (Ride finished, needs payment) --- */
.calendar-ride-payment-pending {
  background-color: #ffe6d6; /* Light orange */
  border-color: #ffc29e;
  color: #c44d08;
  font-weight: 600;
}
.calendar-ride-payment-pending:hover {
  background-color: #ffe0cc;
}


/* --- NEW: Status: completed (Ride finished) --- */
.calendar-ride-completed {
  background-color: var(--color-bg-subtle);
  border-color: var(--color-border-subtle);
  color: var(--color-text-muted);
  text-decoration: line-through;
  opacity: 0.8;
}
.calendar-ride-completed:hover {
  background-color: var(--color-bg-subtle);
  opacity: 1;
}

/* ---------------------------------
 * Post-Match Modals
 * --------------------------------- */
.postmatch-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.postmatch-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 450px;
  padding: 1.5rem;
  animation: modal-fade-in 0.2s ease-out;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.postmatch-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.postmatch-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.postmatch-modal-close {
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0 0.25rem;
  color: #888;
}
.postmatch-modal-close:hover {
  color: #333;
}

.postmatch-modal-body {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  line-height: 1.5;
}

.postmatch-modal-body p {
  margin-top: 0;
}

.postmatch-modal-body strong {
  color: var(--primary);
}

.postmatch-modal-body .ride-details {
  font-size: 0.9rem;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
}
.postmatch-modal-body .ride-details div {
  margin-bottom: 0.25rem;
}

.postmatch-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Shared button styles from core app */
.postmatch-btn {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.postmatch-btn-primary {
  background-color: var(--primary);
  color: white;
}
.postmatch-btn-primary:hover {
  background-color: var(--primary-hover);
}
.postmatch-btn-secondary {
  background-color: var(--secondary);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.postmatch-btn-secondary:hover {
  background-color: var(--border-color);
}
.postmatch-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------------------------------
 * NEW: Post-Ride Rating Modal
 * --------------------------------- */
.rating-stars {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.rating-stars .star {
  font-size: 2.5rem;
  color: #ccc;
  cursor: pointer;
  transition: color 0.1s ease-in-out;
}

.rating-stars .star:hover {
  color: #b3b3b3;
}

/* Class added by JS */
.rating-stars .star.selected {
  color: #ffc107; /* Gold */
}

.rating-comment {
  width: 100%;
  min-height: 80px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg-content);
  font-size: 0.9rem;
  color: var(--color-text);
  resize: vertical;
}

/* ---------------------------------
 * NEW: Invoice Modal Styles
 * --------------------------------- */
.invoice-fare-display {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.invoice-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-color);
}

.invoice-amount {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
}