/* ========================================
   MY HUB - Personal Dashboard Styles
   ======================================== */

/* Section wrapper */
.my-hub-section {
  padding: 16px 12px;
  background: #fff;
  position: relative;
}

/* Shorter border line - inset 12px from each side */
.my-hub-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: #708090;
}

/* Section header - COLLAPSIBLE WITH CHEVRON INDICATOR */
.my-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 8px 4px;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  /* Remove blue/purple tap flash */
  tap-highlight-color: transparent;
}

.my-hub-header:active {
  background: #e8eaed;
}

/* Keep background when section is open (not collapsed) */
.my-hub-section:not(.collapsed) .my-hub-header {
  background: #e8eaed;
}

/* Notifications section - Custom highlight (Dodger Blue 25%) */
#myHubMessages .my-hub-header:active,
#myHubMessages.my-hub-section:not(.collapsed) .my-hub-header {
  background: rgba(30, 144, 255, 0.25);
}

.my-hub-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.my-hub-chevron {
  font-size: 14px;
  transition: transform 0.2s ease;
  color: #6b7280;
  font-weight: 700;
}

.my-hub-section.collapsed .my-hub-chevron {
  transform: rotate(-90deg);
  /* Point right when collapsed */
}

.my-hub-view-all {
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  pointer-events: auto;
  /* Allow clicking even when header is clickable */
}

/* Horizontal scroll container */
.my-hub-scroll-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox */
  padding-bottom: 4px;
  padding-left: 5px;
  max-height: 1000px;
  /* Allow animation */
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.my-hub-section.collapsed .my-hub-scroll-container {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-bottom: 0;
  margin-bottom: 0;
}

.my-hub-scroll-container::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari */
}

/* Base card style - STANDARDIZED TO ACT 1 SPECS */
.my-hub-card {
  flex-shrink: 0;
  width: 260px;
  /* ACT 1: Fixed width - 260px (two-six-zero) */
  height: 100px;
  /* ACT 1: Fixed height - 100px for all cards */
  background: #f9fafb;
  border: 1.5px solid transparent;
  box-shadow: -3px 3px 6px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  /* ACT 1: 12px standard radius */
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  /* Prevent content overflow */
  display: flex;
  flex-direction: column;
}

.my-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 1. QUICK STATS BAR */
.my-hub-stats-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0;
}

.my-hub-stats-bar::-webkit-scrollbar {
  display: none;
}

.stat-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  /* ACT 1: Standard 12px radius */
  min-width: 70px;
}

.stat-badge-icon {
  font-size: 24px;
}

.stat-badge-count {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}

.stat-badge-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
}

/* 2. NOTIFICATIONS - ACT 1 STANDARDIZED - Inherits standard 260px width + 100px height */
.notification-card {
  border-color: #1E90FF;
  /* ACT 1: Dodger blue brand identifier */
}

.notification-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -3px;
  /* ACT 1: Pull header up to create more space for body */
  margin-bottom: 6px;
  /* ACT 1: Reduced spacing to body */
}

.notification-card-title {
  font-size: 16px;
  /* ACT 1: Match incident card */
  font-weight: 700;
  color: #1E90FF;
  /* ACT 1: Dodger blue */
}

.notification-card-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notification-card-status.new {
  background: #1E90FF;
  /* ACT 1: Dodger blue background */
  color: #ffffff;
  /* ACT 1: White text */
}

.notification-card-status.read {
  background: #e5e7eb;
  /* ACT 1: Grey background for viewed notifications */
  color: #6b7280;
  /* ACT 1: Grey text for viewed notifications */
}

.notification-card-body {
  font-size: 15px;
  /* ACT 1: Match incident card body */
  font-weight: 600;
  color: #374151;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Single line only - notifications should be concise */
}

.notification-card-footer {
  font-size: 11px;
  color: #000000;
  /* ACT 1: Black text for footer */
  margin-top: auto;
  /* Push to bottom */
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 3. ACTIVITY FEED */
.activity-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.activity-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.activity-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.activity-time {
  font-size: 12px;
  color: #9ca3af;
}

/* 4. INCIDENTS - Inherits standard 260px width + 135px height from .my-hub-card */
.incident-card {
  /* width: 260px; height: 135px; - REMOVED: Inherits from base */
  border-color: #b22222;
  /* ACT 1: Firebrick red brand identifier */
}

.incident-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -3px;
  /* ACT 1: Pull header up to create more space for body */
  margin-bottom: 6px;
  /* ACT 1: Reduced spacing to body */
}

.incident-card-title {
  font-size: 16px;
  /* ACT 1: Larger than body text */
  font-weight: 700;
  color: #b22222;
  /* ACT 1: Firebrick red */
}

.incident-severity {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.incident-severity.high {
  background: #b22222;
  /* ACT 1: Firebrick red background */
  color: #ffffff;
  /* ACT 1: White text */
}

.incident-severity.medium {
  background: #fef3c7;
  color: #d97706;
}

.incident-severity.low {
  background: #dbeafe;
  color: #2563eb;
}

.incident-card-body {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  flex: 1;
  /* Take remaining space */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* Max 3 lines */
  -webkit-box-orient: vertical;
}

.incident-card-footer {
  font-size: 11px;
  color: #000000;
  /* ACT 1: Black text for footer */
  margin-top: auto;
  /* Push to bottom */
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.incident-card-time {
  display: block;
}

/* 5. ALERT ZONES - ACT 1 STANDARDIZED - Inherits standard 260px width + 100px height */
.zone-card {
  border-color: #5F9EA0;
  /* ACT 1: Cadet Blue brand identifier (Updated from Purple) */
}

.zone-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -3px;
  /* ACT 1: Pull header up to create more space for body */
  margin-bottom: 6px;
  /* ACT 1: Reduced spacing to body */
}

.zone-card-title {
  font-size: 16px;
  /* ACT 1: Match incident card */
  font-weight: 700;
  color: #5F9EA0;
  /* ACT 1: Cadet Blue (Updated from Purple) */
}

.zone-card-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* VIEW status pill */
.zone-card-status.view {
  background: #5F9EA0;
  /* Cadet Blue for VIEW */
  color: #ffffff;
}

.zone-card-body {
  font-size: 15px;
  /* ACT 1: Match incident card body */
  font-weight: 600;
  color: #374151;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* Max 3 lines */
  -webkit-box-orient: vertical;
}

.zone-card-footer {
  font-size: 11px;
  color: #000000;
  /* ACT 1: Black text for footer */
  margin-top: auto;
  /* Push to bottom */
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* MY PEOPLE / CIRCLES - ACT 1 STANDARDIZED - Inherits standard 260px width + 100px height */
.circle-card {
  border-color: #7F00FF !important;
  /* Purple brand identifier for My People */
}

.circle-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -3px;
  margin-bottom: 6px;
}

.circle-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #7F00FF;
  /* Purple for My People */
}

.circle-card-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Member card specific positioning for status badge */
.member-card .circle-card-status {
  position: relative;
  right: -12px;
  top: -6px;
}

/* VIEW status pill */
.circle-card-status.view {
  background: #7F00FF;
  /* Purple for VIEW */
  color: #ffffff;
}

.circle-card-body {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* Max 3 lines */
  -webkit-box-orient: vertical;
}

.circle-card-footer {
  font-size: 11px;
  color: #000000;
  margin-top: auto;
  /* Push to bottom */
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 6. PETITIONS - ACT 1 STANDARDIZED - Inherits standard 260px width + 100px height */
.petition-card {
  border-color: #2F4F4F !important;
  /* ACT 1: Dark Slate Grey brand identifier */
}

.petition-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -3px;
  /* ACT 1: Pull header up to create more space for body */
  margin-bottom: 6px;
  /* ACT 1: Reduced spacing to body */
}

.petition-card-title {
  font-size: 16px;
  /* ACT 1: Match incident card */
  font-weight: 700;
  color: #696969;
  /* Dark grey */
}

.petition-card-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.petition-card-status.view {
  background: #808080;
  /* Grey for VIEW */
  color: #FFFFFF;
  /* White text for contrast */
}

.petition-card-body {
  font-size: 15px;
  /* ACT 1: Match incident card body */
  font-weight: 600;
  color: #374151;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* Max 3 lines */
  -webkit-box-orient: vertical;
}

.petition-card-footer {
  font-size: 11px;
  color: #000000;
  /* ACT 1: Black text for footer */
  margin-top: auto;
  /* Push to bottom */
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 7. GROUPS - ACT 1 STANDARDIZED - Inherits standard 260px width + 100px height */
.group-card {
  border-color: #4682B4 !important;
  /* ACT 1: Steel blue brand identifier */
}

.group-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -3px;
  /* ACT 1: Pull header up to create more space for body */
  margin-bottom: 6px;
  /* ACT 1: Reduced spacing to body */
}

.group-card-title {
  font-size: 16px;
  /* ACT 1: Match incident card */
  font-weight: 700;
  color: #4682B4;
  /* ACT 1: Steel blue */
}

.group-card-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.group-card-status.view {
  background: #4682B4;
  /* Steel blue for VIEW */
  color: #ffffff;
}

.group-card-status.moderator {
  background: #4682B4;
  /* Steel blue for moderator - deprecated, use .view */
  color: #ffffff;
}

.group-card-status.member {
  background: #10b981;
  /* Green for member - deprecated, use .view */
  color: #ffffff;
}

.group-card-body {
  font-size: 15px;
  /* ACT 1: Match incident card body */
  font-weight: 600;
  color: #374151;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* Max 3 lines */
  -webkit-box-orient: vertical;
}

.group-card-footer {
  font-size: 11px;
  color: #000000;
  /* ACT 1: Black text for footer */
  margin-top: auto;
  /* Push to bottom */
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 7. CIRCLE - Old styles removed, using new standardized card structure above */

.circle-card-avatar {
  font-size: 36px;
  flex-shrink: 0;
}

.circle-card-content {
  flex: 1;
  min-width: 0;
}

.circle-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.circle-card-location {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

.circle-card-time {
  font-size: 12px;
  color: #9ca3af;
}

.circle-card-battery {
  font-size: 14px;
  flex-shrink: 0;
}

/* 8. CIVIC REPORTS - ACT 1 STANDARDIZED - Inherits standard 260px width + 100px height */
.civic-card {
  /* width: 260px; height: 100px; - REMOVED: Inherits from base */
  border-color: #F28C28;
  /* ACT 1: Mandarin Orange (User specified) */
}

.civic-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -3px;
  /* ACT 1: Pull header up to create more space for body */
  margin-bottom: 6px;
  /* ACT 1: Reduced spacing to body */
}

.civic-card-title {
  font-size: 16px;
  /* ACT 1: Match incident card */
  font-weight: 700;
  color: #F28C28;
  /* ACT 1: Mandarin Orange */
}

.civic-card-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.civic-card-status.submitted {
  background: #FF4500;
  /* ACT 1: Orange-red background */
  color: #ffffff;
  /* ACT 1: White text */
}

.civic-card-status.pending {
  background: #fef3c7;
  color: #d97706;
}

.civic-card-status.resolved {
  background: #dbeafe;
  color: #2563eb;
}

.civic-card-body {
  font-size: 15px;
  /* ACT 1: Match incident card body */
  font-weight: 600;
  color: #374151;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* Max 3 lines */
  -webkit-box-orient: vertical;
}

.civic-card-footer {
  font-size: 11px;
  color: #000000;
  /* ACT 1: Black text for footer */
  margin-top: auto;
  /* Push to bottom */
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.civic-card-time {
  display: block;
}

.civic-status.pending {
  color: #d97706;
}

.civic-progress {
  color: #2563eb;
}

/* 9. FORUM POSTS - Inherits standard 260px width */
.forum-card {
  /* width: 240px; - REMOVED: Now inherits 260px from base */
}

.forum-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  background: #f3e8ff;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.forum-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
  line-height: 1.4;
}

.forum-card-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

/* 10. RECOMMENDED ACTIONS - Inherits standard 260px width */
.action-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  /* width: 280px; - REMOVED: Now inherits 260px from base */
}

.action-card-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.action-card-content {
  flex: 1;
  min-width: 0;
}

.action-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.action-card-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
}

.action-card-btn {
  width: 100%;
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.action-card-btn:hover {
  background: #1f2937;
}

.map-controls {
  position: absolute;
  bottom: 0px;
  left: 0px;
  z-index: 1000;
}

/* Hide map controls when student drawer is open */
body:has(.student-drawer) .map-controls {
  display: none !important;
}

/* Make Google Maps attribution less obtrusive */
#map .gm-style-cc,
#map .gmnoprint {
  opacity: 0.2;
  /* Slightly fade it */
}

#map a[href^="https://maps.google.com/maps"] {
  font-size: 10px !important;
  /* Make text smaller */
}

/* Incident cards */
.cards {
  width: 90%;
  max-width: 960px;
  margin: 10px auto 10px;
  display: grid;
  gap: 10px;
}

.card {
  border: 2px solid var(--orange);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

/* ACT 1: 12px radius */
.card:hover {
  background: #fafafa;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.title {
  font-weight: bold;
  color: var(--red);
}

.badge {
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid #ccc;
  border-radius: 999px;
  color: #fff;
  font-weight: bold;
}

.badge.high {
  background: #ff3b3f;
  border-color: #ff3b3f;
}

.badge.medium {
  background: #fd7e14;
  border-color: #fd7e14;
}

.badge.low {
  background: #28a745;
  border-color: #28a745;
}

.badge.default {
  background: #6c757d;
  border-color: #6c757d;
}

.meta {
  font-size: 12px;
  color: #555;
  margin-top: 4px;
}

.desc {
  display: none;
  font-size: 14px;
  color: #111;
  margin-top: 8px;
  line-height: 1.4;
}

.card.expanded .desc {
  display: block;
}

.content-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 15px;
  font-size: 14px;
}

/* ACT 1: 12px radius */
.content-overlay strong {
  color: var(--red);
  margin-bottom: 8px;
  display: block;
}

.content-overlay button {
  background: var(--red);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
}

/* ACT 1: 12px radius */

.vote-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* ACT 1: 8px radius for small elements */
.vote-btn:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
}

.vote-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
}

.posted-by {
  color: #666;
}

.see-more {
  background: white;
  color: black;
  border: 1px solid black;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  /* ACT 1: 8px radius for small elements */
}

.see-more:hover {
  background: #f8f9fa;
}

/* OLD INCIDENT MODAL CSS DELETED - 180 lines removed
   Incident details now shown via WeeBroUI drawer (weebro-ui-styles.css)
   Removed: full-incident-modal, voting, comments, report-to-council CSS */

/* Safety: closed drawer shouldn't steal clicks */
#wb-menu:not(.open) {
  pointer-events: none;
}

#wb-menu.open {
  pointer-events: auto;
}

/* Wellbeing Modal Styles (used by Time-Out in Resources drawer) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.quick-call-modal {
  background: white;
  border-radius: 16px;
  padding: 0;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.modal-overlay.show .quick-call-modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #f0f0f0;

  display: flex;
  /* enable flexbox */
  align-items: center;
  /* vertically center title + icon */
  justify-content: space-between;
  /* push title group left, icon right */
}

.modal-title {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
}

.modal-subtitle {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* new wrapper so title+subtitle stay grouped */
.modal-title-group {
  display: flex;
  flex-direction: column;
}

/* new icon */
.modal-header-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.modal-body {
  padding: 16px 24px 24px;
}

.wellbeing-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.wellbeing-option:last-child {
  border-bottom: none;
}

.wellbeing-info {
  flex: 1;
  margin-right: 16px;
}

.wellbeing-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wellbeing-description {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.wellbeing-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.wellbeing-call-button,
.wellbeing-text-button,
.wellbeing-visit-button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
}

.wellbeing-call-button {
  background: #28a745;
  color: white;
}

.wellbeing-call-button:hover {
  background: #218838;
}

.wellbeing-text-button {
  background: #007bff;
  color: white;
}

.wellbeing-text-button:hover {
  background: #0056b3;
}

.wellbeing-visit-button {
  background: #6c757d;
  color: white;
}

.wellbeing-visit-button:hover {
  background: #545b62;
}

.website-link {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.website-link:hover {
  opacity: 1;
}

.wellbeing-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* Timeout Modal Specific Overlay */
.timeout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.timeout-overlay.show {
  opacity: 1;
  visibility: visible;
}

.timeout-overlay .quick-call-modal {
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.timeout-overlay.show .quick-call-modal {
  transform: scale(1) translateY(0);
}

/* Track List Styles */
.track-list-container {
  margin-top: 16px;
}

.track-list-header {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 12px;
  text-align: center;
}

.timeout-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  border-radius: 6px;
}

.timeout-track:hover {
  background-color: #f8f9fa;
}

.timeout-track:last-child {
  border-bottom: none;
}

.track-info {
  flex: 1;
  margin-right: 16px;
}

.track-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.track-description {
  font-size: 13px;
  color: #666;
  font-style: italic;
  line-height: 1.3;
}

.track-duration {
  font-size: 14px;
  font-weight: 600;
  color: #999;
  font-variant-numeric: tabular-nums;
}

/* Audio Player Styles */
.audio-player-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  color: white;
}

.now-playing {
  margin-bottom: 20px;
  text-align: center;
}

.now-playing-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.now-playing-description {
  font-size: 13px;
  opacity: 0.9;
  font-style: italic;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.play-pause-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  color: white;
}

.play-pause-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.play-pause-btn:active {
  transform: scale(0.95);
}

.stop-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  color: white;
}

.stop-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background: white;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
}

.audio-options {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.wake-lock-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}

.wake-lock-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: white;
}

.wake-lock-toggle span {
  opacity: 0.95;
}

/* Attribution Footer */
.timeout-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.timeout-footer p {
  margin: 4px 0;
}

.timeout-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.timeout-footer a:hover {
  text-decoration: underline;
}

.license-text {
  font-size: 11px;
  color: #999;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .audio-player-container {
    padding: 16px;
  }

  .now-playing-title {
    font-size: 16px;
  }

  .now-playing-description {
    font-size: 12px;
  }

  .play-pause-btn {
    width: 52px;
    height: 52px;
  }

  .stop-btn {
    width: 38px;
    height: 38px;
  }

  .track-title {
    font-size: 15px;
  }

  .track-description {
    font-size: 12px;
  }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
  .audio-player-container {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }

  .progress-bar {
    padding: 8px 0;
    margin: -8px 0;
  }
}

/* Student Safety Packs Styles */
.safety-packs {
  margin: 20px auto;
  max-width: 960px;
  width: 90%;
}

.safety-pack-card {
  background-color: #ffffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  /* ACT 1: Standard 12px radius */
  padding: 6px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  min-height: 80px;
  width: 120px;
  flex: 0 0 auto;
}

.safety-pack-card:hover {
  transform: translateY(-2px);
}

.card-icon-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 4px;
}

.card-content {
  margin-top: auto;
  padding-top: 4px;
}

.card-title {
  font-size: 11px;
  font-weight: 600;
  color: #333;
  margin-bottom: 1px;
  line-height: 1.2;
}

.card-subtitle {
  font-size: 6px;
  color: #666;
  line-height: 1.1;
}

.card-row {
  background-color: #e8e8e8ff;
  border-radius: 12px;
  /* ACT 1: Standard 12px radius */
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.card-row-header {
  margin-bottom: 0;
  padding-left: 0;
}

.card-row-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 1px;
  margin-top: 0;
}

.card-row-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #666;
}

.card-row-scroll {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  flex: 0 0 auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.card-row-scroll::-webkit-scrollbar {
  display: none;
}

.card-row-scroll .card {
  flex: 0 0 auto;
}

/* Safety Pack Modal Styles */
.safety-pack-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.safety-pack-modal.open {
  display: flex;
}

.safety-pack-modal-content {
  background: white;
  border-radius: 16px;
  padding: 0;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease;
}

.safety-pack-modal-header {
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.safety-pack-modal-header h3 {
  margin: 0;
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
}

.safety-pack-modal-close {
  background: #f8f9fa;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.safety-pack-modal-close:hover {
  background: #e9ecef;
}

.safety-pack-modal-body {
  padding: 16px 24px 24px;
}

.safety-pack-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.safety-pack-option:last-child {
  border-bottom: none;
}

.safety-pack-info {
  flex: 1;
}

.safety-pack-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.safety-pack-button {
  background-color: #04aa3bff;
  color: white;
  border: 1px solid #1e0101ff;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 200ms;
  min-width: 80px;
}

.safety-pack-button:hover {
  background-color: #028a30;
}

/* Safety Pack Confirmation Toast */
.safety-pack-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid #04aa3bff;
  border-radius: 12px;
  padding: 20px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  z-index: 20000;
  animation: toastSlideIn 0.3s ease;
}

.safety-pack-toast-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 19999;
}

.safety-pack-toast-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: #04aa3bff;
}

.safety-pack-toast-header i {
  font-size: 20px;
  margin-right: 8px;
}

.safety-pack-toast-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.safety-pack-toast-body {
  margin-bottom: 20px;
  line-height: 1.5;
  color: #374151;
  font-size: 14px;
}

.safety-pack-toast-buttons {
  display: flex;
  gap: 12px;
}

.safety-pack-toast-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.safety-pack-toast-btn.primary {
  background: #04aa3bff;
  color: white;
}

.safety-pack-toast-btn.primary:hover {
  background: #028a30;
}

.safety-pack-toast-btn.secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.safety-pack-toast-btn.secondary:hover {
  background: #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {

  /* .action-button { width: 90%; } */
  /* COMMENTED OUT - UI REDESIGN */
  .nearby-section {
    width: 95%;
  }

  .cards {
    width: 95%;
  }

  /* #how-it-works { padding: 10px; } */
  /* COMMENTED OUT - UI REDESIGN */
}

/* Safety Circle Toggle */
.toggle-icon,
.toggle-text {
  pointer-events: none;
  /* Clicks pass through to button */
}

.map-toggle {
  background: white;
  border: 1px solid #666;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background 200ms, border-color 200ms, color 200ms;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.map-toggle:hover {
  transform: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.map-toggle[data-enabled="true"] {
  background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
  border-color: #30D158;
  color: #666;
  border-color: #666;
}

.map-toggle[data-enabled="false"] {
  background: white;
  color: #666;
  border-color: #666;
}

.toggle-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: #666;
  /* Match the grey text color - stays constant */
  transition: none;
  /* No color transitions */
}


@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.toggle-badge {
  background: #FF3B30;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.toggle-text {
  white-space: nowrap;
  color: #666;
  /* Always dark grey */
  pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .map-toggle {
    bottom: 70px;
    font-size: 12px;
    padding: 8px 16px;
  }
}

/* Split-view state: pin map container to top, hide everything else */
body.split-view-active .nearby-section {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 10000 !important;

  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;

  width: 100vw !important;
  max-width: none !important;
}

body.split-view-active .section-label,
body.split-view-active .map-controls {
  display: none !important;
}

body.split-view-active #map {
  height: 50dvh !important;
  width: 100% !important;
  border-radius: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* body.split-view-active .button-container, */
/* COMMENTED OUT - UI REDESIGN */
body.split-view-active #nearbyList,
body.split-view-active footer,
body.split-view-active header {
  display: none !important;
}

.bottom-sheet-content {
  height: 50dvh;
  margin-top: auto;
}

/* Auth Modal */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.auth-modal.open {
  display: flex;
}

.auth-modal-content {
  background: white;
  border-radius: 16px;
  padding: 0;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.auth-modal-header {
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.auth-modal-header h3 {
  margin: 0;
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
}

.auth-modal-close {
  background: #f8f9fa;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.auth-modal-close:hover {
  background: #e9ecef;
}

.auth-modal-body {
  padding: 16px 24px 24px;
}

.auth-modal-body p {
  margin: 0 0 24px;
  line-height: 1.5;
  color: #555;
}

.auth-modal-buttons {
  display: flex;
  gap: 12px;
}

.auth-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.auth-btn.primary {
  background: var(--red);
  color: white;
}

.auth-btn.primary:hover {
  background: #05870c;
  transform: translateY(-1px);
}

.auth-btn.secondary {
  background: white;
  color: var(--blue);
  border: 2px solid var(--blue);
}

.auth-btn.secondary:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .auth-modal-buttons {
    flex-direction: column;
  }
}

/* Crime Card Styles */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.crime-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
  font-size: 13px;
}

.crime-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.crime-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.crime-type {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.2;
}

.crime-distance {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.crime-location {
  color: #64748b;
  margin-bottom: 4px;
  line-height: 1.3;
}

.crime-date {
  color: #9ca3af;
  font-size: 11px;
}

.severity-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.severity-high {
  background: #fee2e2;
  color: #dc2626;
}

.severity-medium {
  background: #fef3c7;
  color: #d97706;
}

.severity-low {
  background: #dcfce7;
  color: #16a34a;
}

/* Scotland Toast Styles */
.scotland-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid #2563eb;
  border-radius: 12px;
  padding: 20px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  z-index: 20000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  animation: toastSlideIn 0.3s ease;
}

.scotland-toast-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 19999;
}

.scotland-toast-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  color: #1e40af;
}

.scotland-toast-header i {
  font-size: 20px;
  margin-right: 8px;
}

.scotland-toast-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.scotland-toast-body {
  margin-bottom: 20px;
  line-height: 1.5;
  color: #374151;
  font-size: 14px;
}

.scotland-toast-buttons {
  display: flex;
  gap: 12px;
}

.scotland-toast-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.scotland-toast-btn.primary {
  background: #2563eb;
  color: white;
}

.scotland-toast-btn.primary:hover {
  background: #1d4ed8;
}

.scotland-toast-btn.secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.scotland-toast-btn.secondary:hover {
  background: #e5e7eb;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 480px) {
  .scotland-toast-buttons {
    flex-direction: column;
  }
}