/* Events Page Styles */

.events-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.events-header h2 {
  margin: 0;
  color: var(--color-brand);
}

.events-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
}

.filter-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-section label {
  font-weight: 600;
  color: var(--color-brand);
}

.filter-section select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  background: white;
}

.view-toggle {
  display: flex;
  gap: 0.25rem;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn:hover {
  background: #f0f0f0;
}

.view-btn.active {
  background: var(--color-accent);
  color: white;
}

/* Events List Styles */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.event-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

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

.event-category {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.category-mass { background: #e3f2fd; color: #1565c0; }
.category-social { background: #f3e5f5; color: #7b1fa2; }
.category-service { background: #e8f5e8; color: #2e7d32; }
.category-education { background: #fff3e0; color: #ef6c00; }
.category-meeting { background: #fce4ec; color: #c2185b; }
.category-other { background: #f5f5f5; color: #616161; }

.event-date-time {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
  font-weight: 600;
}

.event-location {
  color: #666;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.event-description {
  color: #333;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.event-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Card View Styles */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.events-grid .event-item {
  height: fit-content;
}

/* Button Styles */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

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

.btn-primary:hover {
  background: #8e6600;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* Event Button Styles */
.event-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.event-button:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.event-button.btn-primary {
  background: #007bff;
  color: white;
}

.event-button.btn-primary:hover {
  background: #0056b3;
}

.event-button.btn-success {
  background: #28a745;
  color: white;
}

.event-button.btn-success:hover {
  background: #1e7e34;
}

.event-button.btn-warning {
  background: #ffc107;
  color: #212529;
}

.event-button.btn-warning:hover {
  background: #e0a800;
}

.event-button.btn-info {
  background: #17a2b8;
  color: white;
}

.event-button.btn-info:hover {
  background: #117a8b;
}

.event-button.btn-secondary {
  background: #6c757d;
  color: white;
}

.event-button.btn-secondary:hover {
  background: #545b62;
}

/* Event URL Display */
.event-url {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.event-url a {
  color: var(--color-brand);
  text-decoration: none;
}

.event-url a:hover {
  text-decoration: underline;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  box-sizing: border-box;
}

.modal-content {
  background: white;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 2px solid #e0e0e0;
}

.modal-small {
  max-width: 450px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1.5rem;
  border-bottom: 2px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.modal-header h3 {
  margin: 0;
  color: var(--color-brand);
  font-size: 1.4rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.1);
}

.modal-body {
  padding: 2rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem 2rem;
  border-top: 2px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Form Styles */
.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--color-brand);
  font-size: 1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(183, 148, 0, 0.15);
  background: #fefefe;
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  color: #666;
  font-size: 0.85rem;
  font-style: italic;
}

/* Messages */
.loading-message {
  text-align: center;
  padding: 3rem;
  color: #666;
  font-style: italic;
}

.no-events {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.no-events h3 {
  color: var(--color-brand);
  margin-bottom: 1rem;
}

.error-message {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.success-message {
  color: #28a745;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.error {
  background: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
  .events-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .events-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .view-toggle {
    align-self: center;
  }
  
  .events-grid {
    grid-template-columns: 1fr;
  }
  
  .event-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .event-date-time {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .modal-content {
    margin: 1rem;
    width: calc(100% - 2rem);
  }
  
  .modal-actions {
    flex-direction: column;
  }
}

/* Print Styles */
@media print {
  .events-controls,
  .modal,
  .btn {
    display: none !important;
  }
  
  .event-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}