/* ===== Event Styles ===== */
.event-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: auto;
  padding: 20px;
  background: #f5f5f5;
  position: relative;
}

.event-container {
  max-width: 800px;
  width: 80%;
  background: #fff;
  padding: 36px;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  text-align: center;
  overflow: hidden;
  position: relative;
}

/* Wrapper dla przycisku Dodaj */
.gg-add-btn-wrap {
  width: 100%;
  display: block;
  margin-top: 12px;
}

.event-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  margin: 18px 0 12px;
  color: #333;
  line-height: 1.2;
}

.event-date {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 14px;
  font-weight: 500;
}

.event-invite {
  max-width: 780px;
  margin: 0 auto 22px;
  font-size: 1rem;
  color: #4a3a2d;
  line-height: 1.45;
}

.event-content {
  text-align: left;
  font-size: 1rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ===== Cover ===== */
.event-cover {
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  background: transparent;
  aspect-ratio: 16 / 9;
}

.event-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.event-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: inset 0 60px 100px rgba(0,0,0,0.04);
  mix-blend-mode: multiply;
}

/* ===== Uploader ===== */
#gg-uploader-wrap {
  max-width: 760px;
  margin: 18px auto 12px;
  padding: 0 12px;
  box-sizing: border-box;
}

#gg-uploader-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid #e5e6e6;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  width: 100%;
  border-radius: 0;
  font-size: 1.08rem;
  transition: all 0.2s ease;
}

#gg-uploader-text {
  font-weight: 700;
  color: #3a2f2f;
}

/* preview list */
#gg-upload-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.gg-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 12px rgba(0,0,0,0.04);
  width: 100%;
  box-sizing: border-box;
}

.gg-preview-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.gg-preview-remove {
  background: transparent;
  border: none;
  color: #b33;
  font-weight: 800;
  cursor: pointer;
  font-size: 1rem;
}

/* Add button */
#gg-add-btn {
  background: #111;
  color: #fff;
  border: none;
  padding: 18px 30px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
  display: none; /* JS pokazuje */
  font-size: 1.3rem;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
}

/* ===== Masonry Gallery ===== */
.gg-gallery {
  column-count: 3;
  column-gap: 12px;
  margin-top: 18px;
}

.gg-card {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 18px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f6f6;
  box-shadow: 0 6px 14px rgba(0,0,0,0.04);
  opacity: 0;
  transform: translateY(20px);
  transition: all .5s ease;
}

.gg-card.show {
  opacity: 1;
  transform: translateY(0);
}

.gg-card img, .gg-card video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

/* ===== Lightbox ===== */
#gg-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.88);
  z-index: 16000;
}

#gg-lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 46px;
  width: 68px;
  height: 68px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

#gg-lb-counter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0,0,0,0.36);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 16001;
}

#gg-lb-inner {
  width: 92%;
  height: 92%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ===== Mobile (max-width: 768px) ===== */
@media (max-width: 768px) {
  #gg-uploader-label {
    padding: 22px 28px;
    font-size: 1.3rem;
  }

  #gg-add-btn {
    padding: 30px 32px;
    font-size: 1.6rem;
    width: 100%;
  }

  .gg-gallery {
    column-count: 1;
    column-gap: 10px;
    padding: 0 8px;
  }

  #gg-upload-preview {
    flex-direction: column;
    gap: 12px;
  }

  .gg-preview-item {
    width: 100%;
  }

  .event-container {
    padding: 20px;
    width: 100%;
  }

  .event-title { font-size: 1.8rem; }
  .event-date { font-size: 1rem; }
  .event-invite { font-size: 1rem; }
}

/* ===== Larger screens ===== */
@media (min-width: 700px) {
  .event-container { max-width: 980px; padding: 28px; }
  .event-title { font-size: 2.4rem; }
  .event-cover { aspect-ratio: 16/9; max-height: 480px; }
  #gg-upload-preview { flex-direction: row; flex-wrap: wrap; }
  .gg-preview-item { width: calc(50% - 8px); }
  .gg-gallery { column-count: 2; column-gap: 12px; padding: 0; }
}

@media (min-width: 1100px) {
  .event-container { max-width: 1200px; }
  .event-cover { aspect-ratio: 21/9; }
  .gg-gallery { column-count: 3; column-gap: 14px; }
}
