/* EventView.module.css */
.container {
  min-height: 100vh;
  background-color: #2f2464;
  padding: 1rem;
}

.content {
  max-width: 1024px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.5rem;
  margin-bottom: 1rem;
}

.headerActions {
  display: flex;
  align-items: center;
}

.title {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 2.5rem;
}

.leaveButton {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.5s;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  color: white;
}

.leaveButton::before,
.leaveButton::after {
  content: "";
  position: absolute;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s, transform 0.5s;
  width: 100%;
  text-align: center;
}

.leaveButton::before {
  content: "X";
  color: black;
  opacity: 1;
}

.leaveButton::after {
  content: "Leave Event";
  opacity: 0;
}

.leaveButton:hover {
  width: 10rem;
  background: rgba(220, 38, 38, 0.8); /* Culoare roșie pentru Leave Event */
  color: white;
}

.leaveButton:hover::before {
  opacity: 0;
  transform: translate(-50%, -150%);
}

.leaveButton:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.reportButton {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 0.5rem;
}

.reportButton:hover {
  background: rgba(255, 255, 255, 0.3);
}

.mainGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .mainGrid {
    grid-template-columns: 2fr 1fr;
    align-items: stretch;
  }
}

.leftColumn {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 1.5rem;
}

.eventCard {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  justify-content: flex-start;
}

.eventImage {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.infoGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.infoCard {
  background: rgba(79, 70, 229, 0.5);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.mediaCardButton {
  background: radial-gradient(
    circle at bottom right,
    #a078e4 0%,
    #8d80ec 57%,
    #738bf8 100%
  );
  box-shadow: 0 0 15px rgba(208, 195, 254, 0.5);
  color: white;
  border: none;
  font-weight: 740;
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.1s ease,
    background 0.2s;
  width: 100%;
}

.mediaCardButton:hover {
  transform: scale(1.05);
}

.mediaCardButton:active {
  transform: scale(1);
}

.infoLabel {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.infoValue {
  color: white;
  font-weight: 600;
}

.locationCard {
  background: rgba(79, 70, 229, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.locationLabel {
  display: flex;
  align-items: center;
  color: white;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.locationText {
  color: white;
  font-size: 0.875rem;
}

.descriptionCard {
  background: rgba(55, 48, 163, 0.5);
  border-radius: 0.75rem;
  padding: 1.5rem;
  grid-column: 1 / -1;
  min-height: 8rem; /* Make description taller */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.descriptionTitle {
  color: white;
  font-weight: 500;
  margin: 0;
}

.descriptionText {
  color: white;
  font-size: 0.875rem;
  line-height: 1.6;
}

.rightColumn {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem; /* Increased gap for more separation between elements */
}

.guestCard {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
}

.plannerTitleSection {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guestCount {
  display: flex;
  align-items: center;
  color: white;
  font-size: 1.125rem;
  gap: 0.5rem;
}

.sectionTitle {
  color: white;
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0;
  margin-top: 1rem;
}

.plannerCard {
  all: unset; /* added this because it is a button */
  display: flex;
  align-items: center;
  padding: 0.75rem;
  padding-right: 3rem; /* added this, trust me */
  border-radius: 0.5rem;
  background: linear-gradient(90deg, #9333ea 0%, #4f46e5 100%);
  cursor: pointer;
  transition: box-shadow ease 0.5s;
  width: 100%;
  box-sizing: border-box;
}

.plannerCard:hover {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.plannerImage {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  margin-right: 0.75rem;
  border: 2px solid white;
}

.plannerName {
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
}

.plannerRole {
  color: #e9d5ff;
  font-size: 0.75rem;
}

.plannerSection {
  display: flex;
  flex-direction: column;
}

.guestsList {
  max-height: 30rem;
  min-height: 12rem;
  overflow-y: auto;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.guestItem {
  all: unset; /* added this because it is a button */
  display: flex;
  align-items: center;
  padding: 0.5rem;
  padding-right: 3rem; /* added this, trust me */
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.guestItem:hover {
  background: rgba(255, 255, 255, 0.2);
}

.guestImage {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  margin-right: 0.75rem;
}

.guestName {
  color: white;
  font-size: 0.875rem;
}

.actionButtons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wishlistButton {
  background: radial-gradient(
    circle at bottom right,
    #a078e4 0%,
    #8d80ec 57%,
    #738bf8 100%
  );
  box-shadow: 0 0 15px rgba(208, 195, 254, 0.5);
  color: white;
  border: none;
  font-weight: 740;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition:
    transform 0.1s ease,
    background 0.2s;
  width: 100%;
}

.wishlistButton:hover {
  transform: scale(1.02);
}

.wishlistButton:active {
  transform: scale(1);
}

.contributeButton {
  background: radial-gradient(
    circle at bottom right,
    #a078e4 0%,
    #8d80ec 57%,
    #738bf8 100%
  );
  box-shadow: 0 0 15px rgba(208, 195, 254, 0.5);
  color: white;
  font-weight: 740;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition:
    transform 0.1s ease,
    background 0.2s;
  width: 100%;
}

.contributeButton:hover {
  transform: scale(1.02);
}

.contributeButton:active {
  transform: scale(1);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modalContent {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 28rem;
}

.modalTitle {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.modalDescription {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.modalTextarea {
  width: 95%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  resize: none;
  height: 6rem;
  font-size: 0.875rem;
}

.modalButtons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.modalButtonSecondary {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  color: #374151;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.modalButtonSecondary:hover {
  background: #f9fafb;
}

.modalButtonPrimary {
  flex: 1;
  padding: 0.5rem 1rem;
  background: #dc2626;
  color: white;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.modalButtonPrimary:hover {
  background: #b91c1c;
}

.icon {
  width: 1rem;
  height: 1rem;
}

/* EDIT/VIEW Media Modal - PLANNER AND GUESTS */
.editMediaModalWrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.editMediaModalContent {
  background: #43328b;
  padding: 2rem;
  border-radius: 16px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.editMediaHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.editMediaGrid {
  display: grid;
  gap: 1rem;
  overflow-y: auto;
  flex-grow: 1;
  padding: 1rem 0;
  scrollbar-width: none;
  max-height: 60vh;
  grid-template-columns: repeat(4, 1fr);
}

.editMediaItem img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.editMediaItem {
  position: relative;
  border: none;
  border-radius: none;
  overflow: hidden;
}

.removeButton {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ff5c5c;
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 1;
}

.editMediaActions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

/* UPLOAD MODAL POPUP */
.uploadModal {
  background: #3f2a82;
  padding: 2.5rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.uploadModal .modalTitle {
  margin: 0;
  color: #fff;
  font-size: 1.25rem;
}

/* UPLOAD MEDIA caption input */
.captionInput {
  width: 100%;
  max-width: 28rem;
  align-self: center;
  padding: 0.75rem 1rem;
  margin: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #a45eeb, #6b1ed9);
  border: none;
  color: #fff;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.captionInput::placeholder {
  color: rgba(255, 255, 255, 0.37);
}

.uploadingState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.uploadSpinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.uploadingText {
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

/* Update the captionInput to show disabled state after choosing a file */
.captionInput:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* hide the native file‐input */
.fileInputWrapper input[type="file"] {
  display: none;
}

/* style the UploadButton’s <label> */
.fileInputWrapper > label {
  display: block;
  width: 100%;
  text-align: center;
  background: radial-gradient(
    circle at bottom right,
    #a078e4 0%,
    #8d80ec 57%,
    #738bf8 100%
  );
  color: #fff;
  padding: 0.75rem;
  border-radius: 0.75rem;
  box-shadow: 0 0 12px rgba(208, 195, 254, 0.6);
  cursor: pointer;
  transition:
    transform 0.1s ease,
    background 0.2s;
}
.fileInputWrapper > label:hover {
  transform: scale(1.02);
}

/* hide UploadThing’s filename badge */
.fileInputWrapper > div[data-element="allowed-content"] {
  display: none;
}

.uploadActions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.modalBackdrop {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.caption {
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.confirmationState {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}
.confirmationText {
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.confirmationButtons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}