/*
 * Past of Today - Custom Theme
 * Professional styling with Bootstrap 5 integration
 */

/* ========================================
   CSS Variables - Design System
   ======================================== */
:root {
  /* Brand Colors */
  --pot-primary: #1a73e8;
  --pot-primary-dark: #1557b0;
  --pot-primary-light: #4a8df0;
  --pot-secondary: #5f6368;
  --pot-accent: #ea8600;

  /* Semantic Colors */
  --pot-success: #1e8e3e;
  --pot-warning: #f9ab00;
  --pot-danger: #d93025;
  --pot-info: #1a73e8;

  /* State Colors */
  --state-verified: #28a745;
  --state-unverified: #ffc107;
  --state-rejected: #dc3545;
  --state-published: #17a2b8;
  --state-deleted: #6c757d;

  /* Neutral Colors */
  --pot-gray-50: #f8f9fa;
  --pot-gray-100: #f1f3f4;
  --pot-gray-200: #e8eaed;
  --pot-gray-300: #dadce0;
  --pot-gray-400: #bdc1c6;
  --pot-gray-500: #9aa0a6;
  --pot-gray-600: #80868b;
  --pot-gray-700: #5f6368;
  --pot-gray-800: #3c4043;
  --pot-gray-900: #202124;

  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ========================================
   Base Styles
   ======================================== */
body {
  font-family: var(--font-primary);
  color: var(--pot-gray-800);
  background-color: var(--pot-gray-50);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 72px; /* Height of fixed navbar */
  padding-bottom: 120px; /* Height of fixed footer */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--pot-gray-900);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
  color: var(--pot-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--pot-primary-dark);
  text-decoration: underline;
}

/* ========================================
   Navbar Styling
   ======================================== */
.navbar-pot {
  background: linear-gradient(135deg, var(--pot-primary) 0%, var(--pot-primary-dark) 100%);
  box-shadow: var(--shadow-md);
  padding: 0.75rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;
}

.navbar-pot .navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: white !important;
  display: flex;
  /* align-items: center; */
  gap: 0.5rem;
}

.navbar-pot .navbar-brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.navbar-pot .brand-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.75rem;
  line-height: 1.2;
}

.navbar-pot .brand-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-pot .brand-tagline {
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.9;
  letter-spacing: 0.5px;
}

.navbar-pot .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.navbar-pot .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white !important;
  text-decoration: none;
}

.navbar-pot .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: white !important;
}

.navbar-pot .btn-outline-light {
  border-width: 2px;
  font-weight: 600;
  padding: 0.375rem 1rem;
}

.navbar-pot .btn-outline-light:hover {
  background-color: white;
  color: var(--pot-primary);
}

.navbar-pot .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  margin-top: 0.5rem;
}

.bi::before {
  vertical-align: 0rem;
}

/* User badge in navbar */
.user-badge {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ========================================
   Content Container
   ======================================== */
.main-content {
  flex: 1;
  padding: var(--spacing-xl) 0;
  background-color: var(--pot-gray-50);
}

.content-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.page-header {
/*  margin-bottom: var(--spacing-xl); 
  padding-bottom: var(--spacing-lg); */
  border-bottom: 2px solid var(--pot-gray-200);
}

.page-title {
  color: var(--pot-gray-900);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--pot-gray-600);
  font-size: 1.rem;
  margin-bottom: 0;
}

/* ========================================
   Event State Badges
   ======================================== */
.badge-state {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-verified {
  background-color: var(--state-verified);
  color: white;
}

.badge-unverified {
  background-color: var(--state-unverified);
  color: var(--pot-gray-900);
}

.badge-rejected {
  background-color: var(--state-rejected);
  color: white;
}

.badge-published {
  background-color: var(--state-published);
  color: white;
}

.badge-deleted {
  background-color: var(--state-deleted);
  color: white;
}

.badge-review-requested {
  background-color: var(--pot-accent);
  color: white;
}

/* ========================================
   Tables
   ======================================== */
.table-pot {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-pot thead {
  background: linear-gradient(135deg, var(--pot-gray-100) 0%, var(--pot-gray-200) 100%);
}

.table-pot thead th {
  font-weight: 600;
  color: var(--pot-gray-800);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  padding: 1rem;
  border: none;
}

.table-pot tbody tr {
  transition: background-color 0.2s ease;
  border-bottom: 1px solid var(--pot-gray-200);
}

.table-pot tbody tr:last-child {
  border-bottom: none;
}

.table-pot tbody tr:hover {
  background-color: var(--pot-gray-50);
}

.table-pot tbody td {
  padding: 1rem;
  vertical-align: middle;
}

/* Empty state */
.table-empty {
  text-align: center;
  /* padding: 3rem 1rem; */
  color: var(--pot-gray-500);
}

.table-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

/* ========================================
   Cards
   ======================================== */
.event-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  transition: all 0.3s ease;
  border: 1px solid var(--pot-gray-200);
}

.event-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--pot-gray-200);
}

.event-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pot-gray-900);
  margin: 0;
}

.event-card-meta {
  display: flex;
  gap: var(--spacing-md);
  font-size: 0.875rem;
  color: var(--pot-gray-600);
  margin-bottom: var(--spacing-md);
}

.event-card-body {
  color: var(--pot-gray-700);
  line-height: 1.6;
}

/* ========================================
   Forms
   ======================================== */
.form-pot {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
}

.form-pot .form-label {
  font-weight: 600;
  color: var(--pot-gray-800);
  margin-bottom: var(--spacing-sm);
}

.form-pot .form-control,
.form-pot .form-select {
  border: 2px solid var(--pot-gray-300);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  transition: all 0.2s ease;
}

.form-pot .form-control:focus,
.form-pot .form-select:focus {
  border-color: var(--pot-primary);
  box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.15);
}

.form-pot .form-text {
  color: var(--pot-gray-600);
  font-size: 0.875rem;
}

.form-pot .invalid-feedback {
  font-size: 0.875rem;
  color: var(--pot-danger);
}

/* Error list styling */
.errorlist {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.errorlist li {
  color: var(--pot-danger);
  background-color: #fff5f5;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--pot-danger);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn-pot-primary {
  background: linear-gradient(135deg, var(--pot-primary) 0%, var(--pot-primary-dark) 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-pot-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-pot-secondary {
  background-color: var(--pot-gray-200);
  border: none;
  color: var(--pot-gray-800);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-pot-secondary:hover {
  background-color: var(--pot-gray-300);
  color: var(--pot-gray-900);
}

.btn-pot-danger {
  background-color: var(--pot-danger);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-pot-danger:hover {
  background-color: #c82333;
  color: white;
  transform: translateY(-1px);
}

.btn-pot-outline {
  background-color: transparent;
  border: 2px solid var(--pot-primary);
  color: var(--pot-primary);
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-pot-outline:hover {
  background-color: var(--pot-primary);
  color: white;
}

/* ========================================
   Alerts & Messages
   ======================================== */
.alert-pot {
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: var(--spacing-lg);
  border: none;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid var(--state-verified);
}

.alert-error,
.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid var(--pot-danger);
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border-left: 4px solid var(--state-unverified);
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid var(--pot-info);
}

/* ========================================
   Footer
   ======================================== */
.footer-pot {
  background-color: var(--pot-gray-900);
  color: var(--pot-gray-400);
  padding: 0;
  margin-top: auto;
  border-top: 4px solid var(--pot-primary);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1020;
}

.footer-pot a {
  color: var(--pot-gray-300);
  transition: color 0.2s ease;
}

.footer-pot a:hover {
  color: white;
  text-decoration: none;
}

.footer-links {
  /* display: flex; */
  text-align: center;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0;
  flex-wrap: wrap;
}

/* ========================================
   Utilities
   ======================================== */
.text-primary-pot {
  color: var(--pot-primary) !important;
}

.bg-primary-pot {
  background-color: var(--pot-primary) !important;
}

.shadow-pot {
  box-shadow: var(--shadow-md);
}

.rounded-pot {
  border-radius: var(--radius-lg);
}

/* Loading spinner */
.spinner-pot {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(26, 115, 232, 0.2);
  border-top-color: var(--pot-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  .navbar-pot .brand-tagline {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 0.5px;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .content-card {
    padding: var(--spacing-lg);
  }

  .table-pot {
    font-size: 0.875rem;
  }

  .table-pot thead th,
  .table-pot tbody td {
    padding: 0.75rem 0.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* ========================================
   Date Navigation
   ======================================== */
.date-navigation {
  background: linear-gradient(135deg, var(--pot-gray-50) 0%, white 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-date-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: white;
  border: 2px solid var(--pot-gray-300);
  border-radius: var(--radius-md);
  color: var(--pot-gray-700);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-date-nav:hover {
  background: var(--pot-primary);
  border-color: var(--pot-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(26, 115, 232, 0.2);
}

.btn-date-nav i {
  font-size: 1.1rem;
}

.btn-today {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--pot-primary);
  border: 2px solid var(--pot-primary);
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
}

.btn-today:hover {
  background: var(--pot-primary-dark);
  border-color: var(--pot-primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.4);
}

.date-picker-wrapper-new {
  position: relative;
  display: inline-block;
}

.date-input-styled {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.5rem;
  background: white;
  border: 2px solid var(--pot-primary);
  border-radius: var(--radius-md);
  color: var(--pot-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.15);
  min-width: 200px;
}

.date-input-styled:hover {
  background: var(--pot-primary);
  border-color: var(--pot-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.25);
}

.date-input-styled i {
  font-size: 1.2rem;
}

.date-text-display {
  font-size: 0.95rem;
}

/* Custom Date Picker Dropdown */
.date-picker-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid var(--pot-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  z-index: 1000;
  min-width: 280px;
}

.date-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--pot-gray-200);
}

.month-display {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pot-gray-900);
}

.month-nav-btn {
  background: transparent;
  border: none;
  color: var(--pot-primary);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.month-nav-btn:hover {
  background: var(--pot-primary);
  color: white;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.day-btn {
  background: white;
  border: 1px solid var(--pot-gray-300);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--pot-gray-700);
  transition: all 0.2s ease;
}

.day-btn:hover {
  background: var(--pot-primary-light);
  border-color: var(--pot-primary);
  color: var(--pot-primary);
  transform: scale(1.05);
}

.day-btn.selected {
  background: var(--pot-primary);
  border-color: var(--pot-primary);
  color: white;
  font-weight: 600;
}

/* Responsive adjustments for date navigation */
@media (max-width: 768px) {
  .date-navigation {
    padding: 1rem;
  }

  .btn-date-nav,
  .btn-today,
  .btn-date-picker {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .date-text {
    font-size: 0.85rem;
  }

  .btn-date-picker i {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .date-text {
    display: none;
  }

  .btn-date-picker {
    padding: 0.625rem 1rem;
  }

  .footer-links {
    gap: 0.5rem;
    flex-wrap: nowrap;
  }

  .footer-links a {
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .navbar-pot .brand-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .navbar-pot,
  .footer-pot,
  .btn,
  .alert,
  .date-navigation {
    display: none !important;
  }

  body {
    background: white;
  }

  .content-card {
    box-shadow: none;
    padding: 0;
  }
}
