/**
 * Events Page Styles - Bold Chula's Design
 * Matches Home/Menu/Rewards/Valet theme with glowing borders and brand colors
 */

.page-events {
  min-height: 100%;
  padding-bottom: 24px;
  position: relative;
}

/* Background logo watermark */
.page-events::before {
  content: '';
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background-image: url('/images/Chulas-Logo-Primary-Black.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.04;
  pointer-events: none;
  z-index: -1;
}

/* ==========================================================================
   ACTION BUTTONS - Toggle style with brand colors
   ========================================================================== */

.events-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  padding-top: 0;
}

.btn-events-action {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-events-action.active {
  background: linear-gradient(135deg, rgba(0, 178, 152, 0.15) 0%, rgba(0, 178, 152, 0.08) 100%);
  color: var(--color-text);
  border-color: #00B298;
  box-shadow: 0 0 15px rgba(0, 178, 152, 0.25);
}

.btn-events-action:active {
  transform: scale(0.97);
}

/* ==========================================================================
   SECTION HEADINGS
   ========================================================================== */

.section-heading {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: bold;
  color: var(--color-text);
  padding: 0 16px;
  margin-bottom: 16px;
}

.events-calendar-section {
  margin-bottom: 24px;
}

.events-list-section {
  padding-bottom: 24px;
}

/* ==========================================================================
   WEEK CALENDAR - Teal themed with glowing border
   ========================================================================== */

.week-calendar {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid #00B298;
  border-radius: 20px;
  padding: 20px;
  margin: 0 16px;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(0, 178, 152, 0.15);
}

.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.week-range {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.week-nav-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.week-nav-btn:active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 178, 152, 0.3);
}

.week-nav-btn svg {
  width: 20px;
  height: 20px;
}

.week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  position: relative;
  cursor: pointer;
  border-radius: 12px;
  transition: background var(--transition-fast);
}

.week-day:active {
  background: rgba(255, 255, 255, 0.05);
}

.day-name {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.day-number {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.week-day.today .day-number {
  background: #00B298;
  color: var(--color-text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 178, 152, 0.5);
}

.day-indicator {
  width: 5px;
  height: 5px;
  background: var(--color-chulas-orange);
  border-radius: 50%;
  margin-top: 5px;
  box-shadow: 0 0 8px rgba(248, 160, 84, 0.8);
}

/* ==========================================================================
   EVENTS LIST
   ========================================================================== */

.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
}

/* ==========================================================================
   EVENT CARD - Brand colored borders
   ========================================================================== */

.event-card-ios {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.event-card-ios:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.04);
}

/* Cycling brand colors for event cards */
.event-card-ios:nth-child(5n+1) {
  border-color: var(--color-chulas-orange);
  box-shadow: 0 0 15px rgba(248, 160, 84, 0.2);
}

.event-card-ios:nth-child(5n+2) {
  border-color: var(--color-chulas-lime);
  box-shadow: 0 0 15px rgba(214, 222, 35, 0.2);
}

.event-card-ios:nth-child(5n+3) {
  border-color: var(--color-chulas-red);
  box-shadow: 0 0 15px rgba(240, 89, 96, 0.2);
}

.event-card-ios:nth-child(5n+4) {
  border-color: var(--color-chulas-purple);
  box-shadow: 0 0 15px rgba(112, 96, 169, 0.25);
}

.event-card-ios:nth-child(5n+5) {
  border-color: #00B298;
  box-shadow: 0 0 15px rgba(0, 178, 152, 0.2);
}

.event-card-accent {
  display: none; /* Hide the old accent bar */
}

.event-card-image {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.event-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: bold;
  color: var(--color-text);
  margin: 0;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.meta-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}

.event-card-chevron {
  width: 20px;
  height: 20px;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  margin-left: auto;
  align-self: center;
}

/* ==========================================================================
   RSVP STATUS - Lime themed
   ========================================================================== */

.rsvp-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(214, 222, 35, 0.1);
  border: 1px solid rgba(214, 222, 35, 0.3);
  border-radius: 10px;
  margin-top: 10px;
}

.rsvp-status.confirmed {
  color: var(--color-chulas-lime);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   MY REQUESTS VIEW
   ========================================================================== */

.my-requests-view {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 120px;
}

.my-requests-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  position: sticky;
  top: 0;
  background: var(--color-background);
  z-index: 10;
}

.event-requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
}

.event-request-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Cycling colors for request cards */
.event-request-card:nth-child(4n+1) {
  border-color: var(--color-chulas-purple);
  box-shadow: 0 0 15px rgba(112, 96, 169, 0.2);
}

.event-request-card:nth-child(4n+2) {
  border-color: #00B298;
  box-shadow: 0 0 15px rgba(0, 178, 152, 0.2);
}

.event-request-card:nth-child(4n+3) {
  border-color: var(--color-chulas-orange);
  box-shadow: 0 0 15px rgba(248, 160, 84, 0.2);
}

.event-request-card:nth-child(4n+4) {
  border-color: var(--color-chulas-lime);
  box-shadow: 0 0 15px rgba(214, 222, 35, 0.2);
}

.request-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.request-type-badge {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.request-type-badge.badge-purple {
  background: rgba(112, 96, 169, 0.15);
  color: var(--color-chulas-purple);
  border: 1px solid rgba(112, 96, 169, 0.3);
}

.request-type-badge.badge-teal {
  background: rgba(0, 178, 152, 0.15);
  color: #00B298;
  border: 1px solid rgba(0, 178, 152, 0.3);
}

.request-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
}

.request-event-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: bold;
  color: var(--color-text);
  margin: 0;
}

.request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.request-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
}

.request-meta-item .meta-icon {
  width: 14px;
  height: 14px;
  color: var(--color-text-secondary);
}

.request-description {
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.request-admin-notes {
  margin-top: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.request-admin-notes h4 {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--color-text-tertiary);
  margin: 0 0 6px 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.request-admin-notes p {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--color-text);
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   REQUEST EVENT FORM STYLES
   ========================================================================== */

.request-event-form {
  padding: 20px 16px;
  padding-bottom: 140px;
  max-width: 600px;
  margin: 0 auto;
}

.request-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.request-form-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: bold;
  margin: 0;
  color: var(--color-text);
}

.btn-my-requests {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(214, 222, 35, 0.1);
  border: 1px solid rgba(214, 222, 35, 0.3);
  color: var(--color-chulas-lime);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: all var(--transition-fast);
}

.btn-my-requests:active {
  background: rgba(214, 222, 35, 0.2);
}

.btn-submit-request {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(0, 178, 152, 0.15) 0%, rgba(0, 178, 152, 0.08) 100%);
  border: 1.5px solid #00B298;
  border-radius: 14px;
  color: #00B298;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 0 20px rgba(0, 178, 152, 0.2);
  transition: all var(--transition-fast);
}

.btn-submit-request:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, rgba(0, 178, 152, 0.25) 0%, rgba(0, 178, 152, 0.15) 100%);
  box-shadow: 0 0 30px rgba(0, 178, 152, 0.35);
}

.btn-submit-request.disabled {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text-tertiary);
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================================================
   ROOM INFO CARDS - Cycling brand colors
   ========================================================================== */

.room-info-section {
  margin-top: 16px;
}

.room-section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-tertiary);
  margin: 16px 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.room-info-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.room-info-card:nth-child(odd) {
  border-color: var(--color-chulas-purple);
  box-shadow: 0 0 15px rgba(112, 96, 169, 0.15);
}

.room-info-card:nth-child(even) {
  border-color: #00B298;
  box-shadow: 0 0 15px rgba(0, 178, 152, 0.15);
}

.room-accent {
  display: none; /* Hide old accent */
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.room-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  color: var(--color-text);
}

.room-capacity {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.room-subtitle {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--color-text-tertiary);
  font-style: italic;
  margin: 0 0 12px 0;
}

.room-description {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.room-ideal-for {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--color-text-tertiary);
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.room-ideal-for svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   EVENT DETAIL VIEW - Bottom sheet with brand theme
   ========================================================================== */

.event-detail-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.event-detail-content {
  width: 100%;
  max-height: 90vh;
  background: linear-gradient(180deg, rgba(30, 26, 27, 0.98) 0%, rgba(21, 18, 19, 1) 100%);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px;
  padding-top: 56px;
  padding-bottom: 140px;
  animation: slideUp 0.3s ease-out;
  position: relative;
  border-top: 1.5px solid #00B298;
  box-shadow: 0 -8px 40px rgba(0, 178, 152, 0.15);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Drag handle */
.event-detail-content::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.event-detail-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.event-detail-close:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.1);
}

.event-detail-close svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
}

.event-detail-image {
  margin-bottom: 20px;
  margin-top: 8px;
}

.event-detail-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(0, 178, 152, 0.2);
}

.event-detail-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: bold;
  color: var(--color-text);
  margin: 0 0 16px 0;
}

.event-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.event-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: 14px;
}

.event-detail-meta-item svg {
  width: 18px;
  height: 18px;
  color: #00B298;
  flex-shrink: 0;
}

.event-detail-description {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin: 0 0 24px 0;
}

.event-detail-rsvp {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--color-chulas-lime);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 0 15px rgba(214, 222, 35, 0.15);
}

.event-detail-rsvp-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: bold;
  color: var(--color-text);
  margin: 0 0 16px 0;
}

.event-detail-rsvp-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(214, 222, 35, 0.1);
  border: 1px solid rgba(214, 222, 35, 0.3);
  border-radius: 12px;
  margin-bottom: 16px;
}

.event-detail-rsvp-status svg.rsvp-check {
  width: 22px;
  height: 22px;
  color: var(--color-chulas-lime);
  flex-shrink: 0;
}

.event-detail-rsvp-status span {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-chulas-lime);
}

.btn-rsvp {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, rgba(0, 178, 152, 0.15) 0%, rgba(0, 178, 152, 0.08) 100%);
  color: #00B298;
  border: 1.5px solid #00B298;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 178, 152, 0.2);
  transition: all var(--transition-fast);
}

.btn-rsvp:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, rgba(0, 178, 152, 0.25) 0%, rgba(0, 178, 152, 0.15) 100%);
  box-shadow: 0 0 30px rgba(0, 178, 152, 0.35);
}

.btn-cancel-rsvp {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, rgba(240, 89, 96, 0.15) 0%, rgba(240, 89, 96, 0.08) 100%);
  color: var(--color-chulas-red);
  border: 1.5px solid var(--color-chulas-red);
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(240, 89, 96, 0.2);
  transition: all var(--transition-fast);
}

.btn-cancel-rsvp:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, rgba(240, 89, 96, 0.25) 0%, rgba(240, 89, 96, 0.15) 100%);
  box-shadow: 0 0 30px rgba(240, 89, 96, 0.35);
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.page-events .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.page-events .empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  filter: grayscale(100%) brightness(1.3)
    drop-shadow(0 0 8px rgba(0, 178, 152, 0.8))
    drop-shadow(0 0 16px rgba(0, 178, 152, 0.5));
}

.page-events .empty-state h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: 8px;
}

.page-events .empty-state p {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--color-text-secondary);
}
