/* DISCOVER PAGE OVERRIDES */

#discover-page {
  min-height: 100vh;
  padding: 80px 60px;
  background-color: #f7f3eb;
}

#discover-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}

.discover-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 88px;
  color: #5c2e1f;
  margin-bottom: 10px;
}

.discover-subtitle {
  font-size: 26px;
  color: #555;
}

#open-artist-form {
  padding: 14px 28px;
  background: #5c2e1f;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

#discover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 70px;
}

.discover-tag {
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background-color: white;
  font-size: 18px;
  cursor: pointer;
}

.active-tag {
  background-color: #5c2e1f;
  color: white;
  border: none;
}

/* ARTIST GRID */

#artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 360px);
  justify-content: center;
  gap: 30px;
  margin-top: 50px;
}

/* CLOSED CARD */

.artist-card {
  width: 360px !important;
  max-width: 360px !important;

  background: #fffaf4 !important;
  border: 1px solid #e5d6c5;
  border-radius: 18px;

  padding: 25px;

  text-align: center;
  cursor: pointer;

  box-shadow: 0 4px 14px rgba(0,0,0,0.12);

  transition: all 0.3s ease;
}

.artist-card:hover {
  transform: translateY(-5px);
}

.artist-card-main {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.artist-card-main img {
  width: 100%;
  height: 240px;

  object-fit: cover;

  border-radius: 14px;

  margin: 0 auto 25px auto;

  display: block;
}

.artist-card h3 {
  font-size: 34px;
  margin-bottom: 20px;
  color: #5c2e1f;
  text-align: center;
}

.artist-specialty {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 26px;
  color: #333;
  text-align: center;
}

.artist-location {
  line-height: 1.6;
  color: #555;
  text-align: center;
}

/* EXPANDED CARD */

.artist-card.expanded {
  width: 100% !important;
  max-width: 100% !important;

  grid-column: 1 / -1;

  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 45px;

  text-align: left;
}

.artist-card.expanded .artist-card-main img {
  height: 240px;
}

.artist-card-expanded {
  display: none;
  min-width: 0;

  border-left: 1px solid #e5d6c5;

  padding-left: 35px;
}

.artist-card.expanded .artist-card-expanded {
  display: block;
}

.artist-bio {
  font-size: 20px;
  line-height: 1.7;
  color: #4a4038;
  margin-bottom: 30px;
}

.artist-extra-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.media-card {
  background: white;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #e5d6c5;
}

.media-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
}

/* POST FORM */

#artist-form-container {
  max-width: 600px;
  margin: 40px auto;
  background: #fffaf4;
  padding: 30px;
  border-radius: 18px;
}

#artist-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#artist-form input,
#artist-form select,
#artist-form textarea {
  padding: 14px;
  border: 1px solid #d8c4ad;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
}

#artist-location-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  width: 100%;

  background: white;

  border: 1px solid #d8c4ad;
  border-radius: 10px;

  margin-top: 5px;

  z-index: 1000;

  overflow: hidden;
}

/* EMPTY STATE */

#empty-state {
  text-align: center;
  font-size: 34px;
  color: #666;
  margin-top: 120px;
}

/* MOBILE */

@media (max-width: 768px) {
  #discover-page {
    padding: 50px 22px;
  }

  #discover-header {
    flex-direction: column;
    align-items: stretch;
  }

  #open-artist-form {
    width: 100%;
  }

  #artist-grid {
    grid-template-columns: 1fr;
  }

  .artist-card,
  .artist-card.expanded {
    width: 100% !important;
    max-width: 100% !important;
  }

  .artist-card.expanded {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .artist-card-expanded {
    border-left: none;
    border-top: 1px solid #e5d6c5;
    padding-left: 0;
    padding-top: 25px;
  }
}

.edit-artist-button {
  margin-top: 22px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: #d8b26e;
  color: #2b1a12;
  font-weight: bold;
  cursor: pointer;
}

.edit-artist-button:hover {
  opacity: 0.9;
}

.main-image-help {
  font-size: 14px;
  color: #6b625c;
  margin: 5px 0 15px 0;
}

#main-image-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin: 15px 0 25px 0;
}

.main-image-option {
  border: 2px solid #ddd;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  background: white;
}

.main-image-option input {
  margin-bottom: 8px;
}

.main-image-option img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
}

.main-image-option span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.existing-image-note {
  font-size: 14px;
  color: #6b625c;
}

#artwork-details-container {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.artwork-details-box {
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}

.artwork-details-box h4 {
  margin-bottom: 12px;
}

.artwork-details-box input,
.artwork-details-box textarea {
  width: 100%;
  margin-bottom: 12px;
}

.video-upload-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #6b625c;
}

.media-card {
  cursor: pointer;
}

#artwork-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 30px;
}

#artwork-modal-content {
  position: relative;

  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;

  background: white;
  border-radius: 18px;
  padding: 30px;
}

#close-artwork-modal {
  position: absolute;
  top: 15px;
  right: 20px;

  border: none;
  background: none;
  font-size: 32px;
  cursor: pointer;
}

#modal-artwork-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 20px;
}

#modal-artwork-title {
  margin-bottom: 10px;
}

#modal-artwork-description {
  line-height: 1.6;
  margin-bottom: 20px;
}

#modal-artwork-video {
  width: 100%;
  border-radius: 12px;
}

.artist-card-main img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #f7f0e8;
  border-radius: 14px;
}

.media-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f7f0e8;
  border-radius: 10px;
}

#modal-artwork-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #f7f0e8;
  border-radius: 12px;
}

.artist-card.expanded {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}

.artist-card-expanded {
  min-width: 0;
  overflow: hidden;
}

.artist-extra-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  width: 100%;
  overflow: hidden;
}

.media-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.media-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f7f0e8;
  border-radius: 12px;
}

.media-card h4 {
  text-align: center;
  font-size: 18px;
  margin: 12px 8px;
  overflow-wrap: break-word;
}

.artist-card-main img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #f7f0e8;
  border-radius: 14px;
}

.artist-card.expanded {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}

.artist-card-expanded {
  min-width: 0;
  overflow: hidden;
}

.artist-extra-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  width: 100%;
}

.media-card {
  width: 100%;
  overflow: hidden;
  cursor: pointer;
}

.media-card img,
.artist-card-main img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f7f0e8;
  border-radius: 12px;
}

.artist-card-main img {
  height: 280px;
}

.existing-media-editor,
.new-media-editor {
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
  background: #fff;
}

.existing-media-editor img,
.new-media-editor img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  background: #f7f0e8;
  border-radius: 10px;
  display: block;
  margin-bottom: 12px;
}

.delete-media-button {
  background: #9b2c2c;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.main-image-choice {
  display: block;
  margin: 10px 0;
}

#artwork-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

#artwork-modal-content {
  position: relative;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 18px;
  padding: 30px;
}

#close-artwork-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  border: none;
  background: none;
  font-size: 32px;
  cursor: pointer;
}

#modal-artwork-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #f7f0e8;
  border-radius: 12px;
}

.message-artist-button {
  margin: 18px 0 24px;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: #112f5a;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.message-artist-button:hover {
  background: #1d447c;
}

#message-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#message-modal-content {
  width: min(520px, 100%);
  background: #fffaf4;
  border-radius: 24px;
  padding: 34px;
  position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

#close-message-modal {
  position: absolute;
  top: 16px;
  right: 18px;
  border: none;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
  color: #112f5a;
}

#message-modal-title {
  margin: 0 0 18px;
  color: #112f5a;
  font-size: 2rem;
}

#message-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#message-body {
  width: 100%;
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(17, 47, 90, 0.2);
  border-radius: 16px;
  resize: vertical;
  font-family: inherit;
  font-size: 1rem;
  background: white;
}

#message-form button {
  padding: 13px 22px;
  border: none;
  border-radius: 999px;
  background: #112f5a;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

#message-form button:hover {
  background: #1d447c;
}

#message-status {
  margin-top: 14px;
  color: #112f5a;
  font-weight: 600;
}

.owner-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.edit-artist-button,
.delete-artist-button {
  width: 120px;
  height: 44px;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 0;
  border: none;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 700;
  font-family: inherit;

  cursor: pointer;
  box-sizing: border-box;
}

.edit-artist-button {
  background: #d8b26e;
  color: #2b1a12;
}

.delete-artist-button {
  background: #8f2f2f;
  color: white;
}
.owner-actions .edit-artist-button,
.owner-actions .delete-artist-button {
  margin-top: 0 !important;
  width: 115px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}