/* Plan Responses Page Styles - Matching Dashboard Theme */

/* Use the same color variables as dashboard */
:root {
  --primary: #e50914;
  --secondary: #b20710;
  --primary-light: #ff3b43;
  --primary-transparent: rgba(229, 9, 20, 0.1);
  --text: #ffffff;
  --text-secondary: #b3b3b3;
  --text-tertiary: #737373;
  --background: #141414;
  --surface: #1f1f1f;
  --surface-light: #2a2a2a;
  --surface-lighter: #333333;
  --border: #333333;
  --border-light: #444444;
  --success: #46d369;
  --success-bg: rgba(70, 211, 105, 0.15);
  --warning: #ffc107;
  --warning-bg: rgba(255, 193, 7, 0.15);
  --danger: #dc3545;
  --danger-bg: rgba(220, 53, 69, 0.15);
  --info: #0071eb;
  --info-bg: rgba(0, 113, 235, 0.15);
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Ensure the entire page uses dark theme */
body {
  background-color: var(--background) !important;
  color: var(--text) !important;
}

.plan-responses-container {
  background-color: var(--background);
  color: var(--text);
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-header {
  margin-bottom: 30px;
}

.page-header h1 {
  color: var(--text);
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background-color: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background-color: var(--surface-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.empty-icon .material-symbols-outlined {
  font-size: 40px;
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: var(--text);
  border: none;
  border-radius: 4px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.btn:hover {
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-icon {
  font-size: 18px;
}

/* Plan Cards */
.plan-card {
  background-color: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}

.plan-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--surface-light), var(--surface));
}

.plan-info {
  flex: 1;
}

.plan-title {
  color: var(--text);
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-title .material-symbols-outlined {
  color: var(--primary);
  font-size: 28px;
}

.plan-details {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.plan-date,
.plan-duration {
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-date .material-symbols-outlined,
.plan-duration .material-symbols-outlined {
  font-size: 18px;
}

.plan-stats {
  display: flex;
  gap: 30px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Plages Container */
.plages-container {
  padding: 20px;
}

.no-plages {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.no-plages .material-symbols-outlined {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}

/* Plage Cards */
.plage-card {
  background-color: var(--surface-light);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.plage-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.plage-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.plage-title {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plage-title .material-symbols-outlined {
  color: var(--success);
  font-size: 22px;
}

.plage-details {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.plage-date,
.plage-time,
.plage-supervisor {
  display: flex;
  align-items: center;
  gap: 5px;
}

.plage-details .material-symbols-outlined {
  font-size: 16px;
}

.plage-stats {
  text-align: right;
}

.registration-count {
  background-color: var(--info-bg);
  color: var(--info);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Registrations Container */
.registrations-container {
  padding: 20px;
  background-color: var(--surface-light);
}

.no-registrations {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary);
}

.no-registrations .material-symbols-outlined {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
}

.registrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

/* Registration Cards */
.registration-card {
  background-color: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.registration-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.participant-info {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
  width: 100%;
}

.participant-details {
  flex: 1;
  min-width: 0; /* Allows text to wrap properly */
}

.participant-actions {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  margin-left: auto;
}

.participant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}

.participant-avatar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
}

.participant-name {
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 4px 0;
  word-wrap: break-word;
}

.participant-email {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0;
  word-wrap: break-word;
}

.work-frequency {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  margin-top: 4px;
}

.work-frequency .material-symbols-outlined {
  font-size: 14px;
}

/* Assign Button */
.btn-assign {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--success), #2da350);
  color: var(--text);
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.btn-assign:hover {
  background: linear-gradient(135deg, #46d369, var(--success));
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-assign:active {
  transform: translateY(0);
}

.btn-assign .material-symbols-outlined {
  font-size: 16px;
}

/* Supervisor Badge */
.supervisor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: var(--success-bg);
  color: var(--success);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(70, 211, 105, 0.3);
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}
.cannot-assign {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: var(--danger-bg);
  color: white;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(184, 41, 41, 0.3);
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}

.supervisor-badge .material-symbols-outlined {
  font-size: 16px;
  flex-shrink: 0;
}

/* No Supervisor Indicator */
.no-supervisor {
  color: var(--warning) !important;
}

.response-info {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

.response-answer {
  margin-bottom: 8px;
}

.answer-label {
  background-color: var(--success-bg);
  color: var(--success);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
}

.answer-label.no-answer {
  background-color: var(--warning-bg);
  color: var(--warning);
}

.response-time {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.response-time .material-symbols-outlined {
  font-size: 14px;
}

/* Loading State */
.plage-card.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.plage-card.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background-color: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}

.toast.error {
  background-color: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.toast .material-symbols-outlined {
  font-size: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .plan-responses-container {
    padding: 15px;
  }

  .plan-header {
    flex-direction: column;
    gap: 20px;
  }

  .plan-stats {
    align-self: stretch;
    justify-content: space-around;
  }

  .plage-header {
    flex-direction: column;
    gap: 15px;
  }

  .plage-details {
    flex-direction: column;
    gap: 8px;
  }

  .registrations-grid {
    grid-template-columns: 1fr;
  }

  .plan-details {
    flex-direction: column;
    gap: 8px;
  }

  .participant-info {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .participant-actions {
    align-self: stretch;
    margin-left: 0;
  }

  .btn-assign,
  .supervisor-badge {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .plan-responses-container {
    padding: 10px;
  }

  .plan-card,
  .plage-card {
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 0;
  }

  .plan-header,
  .plage-header,
  .registrations-container {
    padding: 15px;
  }

  .plages-container {
    padding: 15px;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-tertiary);
}
