/**
 * Card View Styles for Event Registration Schedule
 * File: event_registration/css/card-view-styles.css
 */

/* Event filter styling */
.event-filter-container {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.event-filter-item {
  display: inline-block;
  margin-right: 15px;
  margin-bottom: 10px;
}

.event-filter-item a {
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  text-decoration: none;
  color: #495057;
  display: inline-block;
  transition: all 0.2s;
}

.event-filter-item a:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* Print/PDF action buttons */
/* Print/PDF action buttons */
.schedule-actions {
  display: flex; 
  margin-bottom: 30px;
  justify-content: center;
  align-items: center;
}

.print-button,
.pdf-button {
  display: inline-block;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  text-align: center;
  line-height: 1.5;
  -webkit-appearance: button;
  -moz-appearance: button;
  appearance: button;
  user-select: none;
  vertical-align: middle;
}

.print-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
}

.print-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #7d8ff5 0%, #8757b3 100%);
}

.print-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.pdf-button {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white !important;
}

.pdf-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 87, 108, 0.5);
  background: linear-gradient(135deg, #f5a3ff 0%, #ff6680 100%);
}

.pdf-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
}

/* Ensure buttons work on mobile */
@media (hover: none) {
  .print-button:hover,
  .pdf-button:hover {
    transform: none;
  }
  
  .print-button:active,
  .pdf-button:active {
    opacity: 0.8;
  }
}

/* Event title */
.event-schedule-title {
  color: #2c3e50;
  border-bottom: 3px solid #007bff;
  padding-bottom: 10px;
  margin-bottom: 30px;
}



/* Time slot section */
.time-slot-section {
  margin-bottom: 40px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.time-slot-section > summary {
  background: linear-gradient(135deg, #d80 0%, #e90 100%);
  color: white;
  padding: 15px 20px;
  font-size: 1.2em;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.time-slot-section > summary:hover {
  opacity: 0.95;
}

/* Staff assignment box */
.staff-assignment-box {
  background: #e8f4f8;
  padding: 15px 20px;
  margin: 15px;
  border-left: 4px solid #0074D9;
  border-radius: 4px;
  line-height: 1.8;
}

.staff-title {
  color: #0074D9;
  font-size: 1.1em;
  display: block;
  margin-bottom: 10px;
}

/* No registrations message */
.no-registrations {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-style: italic;
}

/* Cards container */
.registration-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* Individual registration card */
.registration-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.registration-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
  border-color: #667eea;
}

/* Card header */
.card-header { 
  
  background: linear-gradient(135deg, #5490C0 0%, #44A0C0 100%);
  color: white;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Card header adjustments when empty (for public view) */
.card-header:empty {
  display: none;
}

/* Alternative: if header shows but has no content, reduce padding */
.card-header:not(:has(*)) {
  display: none;
}

/* Fallback for browsers that don't support :has() */
.card-header {
  min-height: auto;
}

.card-header:empty,
.card-header:blank {
  padding: 0;
  display: none;
  border: none;
}
.sequence-number {
  font-size: 1.3em;
  font-weight: 700;
  letter-spacing: 1px;
}

.duration-badge {
  background: rgba(255, 255, 255, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

/* Performer name */
.performer-name {
  padding: 20px 20px 10px;
  margin: 0;
  font-size: 1.4em;
  color: #2c3e50;
  font-weight: 600;
  border-bottom: 2px solid #f0f0f0;
}

/* Card sections */
.card-section {
  padding: 15px 20px;
}

.detail-row {
  display: flex;
  margin-bottom: 12px;
  line-height: 1.6;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-weight: 600;
  color: #495057;
  min-width: 140px;
  flex-shrink: 0;
}

.detail-value {
  color: #6c757d;
  flex: 1;
}

/* Accompanist section */
.accompanist-section {
  background: #fff9e6;
  border-top: 2px solid #ffe066;
  border-bottom: 2px solid #ffe066;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.section-icon {
  font-size: 1.8em;
  line-height: 1;
}

.accompanist-section strong {
  color: #856404;
  display: block;
  margin-bottom: 5px;
}

/* Brief section - always visible */
.card-brief {
  padding: 15px 20px;
  border-bottom: 1px dashed #e0e0e0;
}

/* Detailed section - hidden by default */
.card-details {
  padding: 15px 20px;
}

.card-details.collapsed { display: none !important; }
.card-details.expanded { display: block !important; }

.card-details .detail-row {
  display: flex;
  margin-bottom: 12px;
  line-height: 1.6;
}

.card-details .accompanist-section {
  background: #fff9e6;
  border-top: 2px solid #ffe066;
  border-bottom: 2px solid #ffe066;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 15px;
  margin: 15px 0;
}

.card-details .additional-info {
  font-size: 0.9em;
  color: #28a745;
  font-weight: 500;
  margin-top: 10px;
}

/* Card footer with expand button */
.card-footer {
  padding: 10px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.expand-btn {
  background: transparent;
  border: none;
  color: #667eea;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  font-size: 14px;
  transition: all 0.2s;
  width: 100%;
  text-align: center;
}

.expand-btn:hover {
  color: #764ba2;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 4px;
}

.expand-btn.expanded {
  color: #764ba2;
}

.additional-info {
  font-size: 0.9em;
  color: #28a745;
  font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
  .registration-cards-container {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 15px;
  }
  
  .detail-row {
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .detail-label {
    min-width: auto;
    margin-bottom: 4px;
    color: #667eea;
    font-size: 0.9em;
  }
  
  .performer-name {
    font-size: 1.2em;
  }
  
  .event-filter-item {
    display: block;
    margin-bottom: 8px;
  }
  
  .event-filter-item a {
    display: block;
    text-align: center;
  }
  .schedule-actions {
    flex-direction: column;
  }
  
  .print-button,
  .pdf-button {
    width: 100%;
  }
  
  .card-brief,
  .card-details {
    padding: 12px 15px;
  }
  
  .expand-btn {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .card-header {
    padding: 10px 15px;
  }
  
  .sequence-number {
    font-size: 1.1em;
  }
  
  .duration-badge {
    font-size: 0.8em;
    padding: 3px 10px;
  }
  
  .performer-name {
    padding: 15px;
    font-size: 1.1em;
  }
  
  .card-section,
  .accompanist-section,
  .card-footer {
    padding: 12px 15px;
  }
}

/* Print styles */
/* Print styles */
.no-print {
  display: block;
}

@media print {
  /* Hide non-printable elements */
  .no-print,
  .event-filter-container,
  .schedule-actions,
  header,
  footer,
  nav,
  .toolbar,
  .tabs,
  .breadcrumb,
  .region-sidebar-first,
  .region-sidebar-second,
  .block-local-tasks-block,
  .action-links {
    display: none !important;
  }
  
  /* Print-specific body styles */
  body {
    background: white !important;
    margin: 20px;
    padding: 20px;
  }
  
  /* Event title styling */
  .event-schedule-title {
    color: #000 !important;
    border-bottom: 2px solid #333 !important;
    page-break-after: avoid;
  }
  
  /* Time slot sections */
  .time-slot-section {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 30px;
    border: 2px solid #333 !important;
  }
  
  .time-slot-section > summary {
    background: #f0f0f0 !important;
    color: #000 !important;
    border-bottom: 2px solid #333;
    padding: 12px 15px;
    font-weight: bold;
  }
  
  /* Open all details elements for printing */
  .time-slot-section[open] {
    display: block;
  }
  
  /* Staff box */
  .staff-assignment-box {
    background: #f8f8f8 !important;
    border-left: 4px solid #333 !important;
    page-break-inside: avoid;
    margin-bottom: 15px;
  }
  
  /* Cards layout for print */
  .registration-cards-container {
    display: block;
    padding: 15px;
  }
  
  .registration-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #333 !important;
    margin-bottom: 15px;
  }
  
  .card-header {
    background: #e0e0e0 !important;
    color: #000 !important;
    border-bottom: 1px solid #333;
  }
  
  .performer-name {
    color: #000 !important;
    page-break-after: avoid;
  }
  
  .card-section {
    page-break-inside: avoid;
  }
  
  .accompanist-section {
    background: #f5f5f5 !important;
    border-top: 1px solid #333 !important;
    border-bottom: 1px solid #333 !important;
  }
  
  /* Hide expand buttons when printing */
  .expand-btn {
    display: none !important;
  }
  
  /* Brief print mode - hide details */
  body[data-print-mode="brief"] .card-details {
    display: none !important;
  }
  
  /* Detailed print mode - show all details */
  body[data-print-mode="detailed"] .card-details {
    display: block !important;
  }
  
  /* Ensure card footer doesn't take space in print */
  .card-footer {
    padding: 0 !important;
    background: none !important;
    border: none !important;
    min-height: 0 !important;
  }
  
  /* Ensure text is black */
  .detail-label,
  .detail-value,
  .additional-info {
    color: #000 !important;
  }
  
  /* Hide interactive elements */
  a[href]:after {
    content: none !important;
  }
}

/* Print preview support */
@page {
  size: letter;
  margin: 0.5in;
}