/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Montserrat:wght@400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    --primary-color: #f4a460;
    --secondary-color: #fad932;
    --accent-color: #ff6b35;
    --dark-color: #2c2c2c;
    --light-color: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --gradient-primary: linear-gradient(135deg, #f4a460 0%, #fad932 100%);
    --gradient-dark: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 15px 50px rgba(0, 0, 0, 0.2);
    --border-radius: 15px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Dark mode variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --navbar-bg: #ffffff;
    --navbar-text: #333333;
    --footer-bg: #f8f9fa;
    --footer-text: #333333;
}

/* Global Styles */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(244, 164, 96, 0.1) 0%, rgba(250, 217, 52, 0.05) 100%);
    overflow-x: hidden;
}

/* Dark mode styles */
body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-card: #2a2a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #3a3a3a;
    --navbar-bg: #2a2a2a;
    --navbar-text: #e0e0e0;
    --footer-bg: #2a2a2a;
    --footer-text: #e0e0e0;
    
    background: 
        linear-gradient(rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.9)),
        url('../images/bee-comb-bg.png') repeat;
    background-size: 300px 300px, 300px 300px;
    background-position: center, center;
    background-attachment: fixed;
    color: var(--text-primary);
}

.divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto 30px;
    border-radius: 2px;
}

/* Reservation History Section Background */
.reservation-history-section {
    background: 
        linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
        url('../images/bee-comb-bg.png') repeat;
    background-size: 300px 300px, 300px 300px;
    background-position: center, center;
    background-attachment: fixed;
}

/* Reservation history section dark mode */
body.dark-mode .reservation-history-section {
    background: 
        linear-gradient(rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.9)),
        url('../images/bee-comb-bg.png') repeat;
    background-size: 300px 300px, 300px 300px;
    background-position: center, center;
    background-attachment: fixed;
    color: var(--text-primary);
}

/* Reservation history cards dark mode */
body.dark-mode .reservation-history-section .card {
    background: #2a2a2a;
    color: white;
    border-color: var(--border-color);
}

body.dark-mode .reservation-history-section .card-header {
    background: #2a2a2a;
    color: white;
    border-bottom-color: var(--border-color);
}

body.dark-mode .reservation-history-section .card-body {
    background: #2a2a2a;
    color: white;
}

body.dark-mode .reservation-history-section .card-title {
    color: white;
}

body.dark-mode .reservation-history-section .card-text {
    color: white;
}

body.dark-mode .reservation-history-section .text-muted {
    color: var(--text-secondary) !important;
}

/* More specific fallback for any card elements */
body.dark-mode .reservation-history-section div[class*="card"] {
    background: #2a2a2a !important;
    color: white !important;
    border-color: var(--border-color) !important;
}

/* Priority message dark mode */
body.dark-mode #priorityMessage {
    color: white !important;
}

body.dark-mode #priorityMessage i {
    color: white !important;
}

/* Reservation History heading dark mode */
body.dark-mode .text-dark {
    color: white !important;
}

body.dark-mode #historyHeader .text-dark {
    color: white !important;
}
.more-items-link {
    cursor: pointer;
    color: #0d6efd !important;
    text-decoration: underline !important;
    font-size: 0.8rem;
}

.more-items-link:hover {
    color: #0a58ca !important;
}

.modal-item {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}

.modal-item:last-child {
    border-bottom: none;
}

#itemsModal .modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#itemsModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive adjustments for modal */
@media (max-width: 576px) {
    #itemsModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
}

/* Fade-in animation keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reservation-card {
  border-radius: 12px;
  overflow: visible;
  margin-bottom: 20px;
  animation: fadeIn 0.6s ease-out;
}

.reservation-card .card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Reservation card dark mode */
body.dark-mode .reservation-card .card {
  background: #2a2a2a;
  border-color: var(--border-color);
  color: white;
}

body.dark-mode .reservation-card .card-header {
  background: #2a2a2a;
  color: white;
  border-bottom-color: var(--border-color);
}

body.dark-mode .reservation-card .card-body {
  background: #2a2a2a;
  color: white;
}

body.dark-mode .reservation-card .card-title {
  color: white;
}

body.dark-mode .reservation-card .card-text {
  color: white;
}

body.dark-mode .reservation-card .text-muted {
  color: var(--text-secondary) !important;
}

.reservation-card .card.shadow-sm {
  box-shadow: none !important;
}

.reservation-card:hover .card {
  background-color: #f8fbff;
  border-color: rgba(13, 110, 253, 0.4);
  box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.18);
}

/* My Reservations Specific Styles */
.reservation-card .card-header {
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.reservation-card .items-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Items list dark mode */
body.dark-mode .reservation-card .items-list {
  background-color: var(--bg-card);
  color: white;
}

body.dark-mode .reservation-card .items-list .item {
  color: white;
}

body.dark-mode .reservation-card .items-list .item-name {
  color: white;
}

body.dark-mode .reservation-card .items-list .item-quantity {
  color: white;
}

.cancel-btn {
  background-color: #dc3545;
  border-color: #dc3545;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  background-color: #c82333;
  border-color: #bd2130;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.acknowledgement-btn {
  background-color: #dc3545;
  color: #ffffff !important;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.acknowledgement-btn:hover,
.acknowledgement-btn:focus {
  background-color: #c82333;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(233, 150, 58, 0.4);
}

.cancel-btn:disabled {
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

/* Status indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Filter buttons centering */
.history-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.history-filters .btn-group {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.history-filters .btn {
  margin: 0 2px;
}

.status-indicator.can-cancel {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-indicator.cannot-cancel {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* Modal customizations */
.modal-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  margin: 1.75rem auto;
}

.modal-content {
  border-radius: 10px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 2px solid #f8f9fa;
  padding: 20px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top: 2px solid #f8f9fa;
  padding: 20px;
}

/* Modal dark mode */
body.dark-mode .modal-content {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .modal-header {
  background: var(--bg-card);
  border-bottom-color: var(--border-color);
  color: var(--text-primary);
}

body.dark-mode .modal-body {
  background: var(--bg-card);
  color: var(--text-primary);
}

body.dark-mode .modal-footer {
  background: var(--bg-secondary);
  border-top-color: var(--border-color);
  color: var(--text-primary);
}

body.dark-mode .modal-item {
  border-bottom-color: var(--border-color);
  color: var(--text-secondary);
}

/* Specific modal styling */
body.dark-mode #cancelModal .modal-header {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

body.dark-mode #deleteHistoryModal .modal-header {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

body.dark-mode #itemsModal .modal-header {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

body.dark-mode #loginPromptModal .modal-header {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .btn-close {
  filter: invert(1);
}

/* Empty reservations styling */
.empty-cart {
  text-align: center;
  padding: 60px 20px;
}

.empty-cart .btn-warning {
  background-color: #e69555;
  border: none;
  font-size: 0.95rem;   
  font-weight: 600;   
  padding: 5px 10px;
  border-radius: 50px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  justify-content: center;
}

.empty-cart .btn-warning:hover {
  background-color: #e67e22;
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 15px rgba(230, 126, 34, 0.3);
}

#emptyReservations .fas.fa-calendar-times {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 20px;
}

.empty-cart i {
  font-size: 4rem;
  color: #f4a460;
  margin-bottom: 20px;
  color: #666666;
}

/* Style for action buttons (Delete, Close) */
.delete-history, .acknowledgement-btn {
  transition: all 0.3s ease;
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: white !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 4px;
}
.delete-history:hover, .delete-history:focus,
.acknowledgement-btn:hover, .acknowledgement-btn:focus {
  background-color: #c82333 !important;
  border-color: #bd2130 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.delete-history:active,
.acknowledgement-btn:active {
  transform: translateY(0);
  box-shadow: none;
}