/**
 * Fotofolio 1 - dettaglio foto (anteprima + sidebar, tema chiaro)
 */

body .mg2025-detail-layout.mg2025-page-photo-detail {
  display: grid !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  min-height: calc(100vh - 64px);
  background: var(--color-background);
  color: var(--color-text);
}

body .mg2025-detail-layout.mg2025-page-photo-detail > .mg2025-main {
  min-width: 0;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-gallery-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 32px;
  background: var(--color-background);
}

body .mg2025-detail-layout.mg2025-page-photo-detail .photo-detail-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .photo-detail-image {
  max-width: 100% !important;
  max-height: calc(100vh - 184px) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
  margin: 0 auto;
  display: block !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-gallery-toolbar {
  width: 100%;
  padding: 16px 32px 0;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mobile-photo-title {
  color: var(--color-text) !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-description,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-linked-user,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-external-links {
  color: var(--color-text);
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-linked-user,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-external-links {
  border-top-color: var(--color-border);
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section {
  border-top-color: var(--color-border) !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comments-empty,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-reply-cancel-btn {
  color: var(--color-text-muted) !important;
}

body .mg2025-detail-layout > main.mg2025-main,
body .mg2025-detail-layout.mg2025-page-photo-detail > main.mg2025-main {
  background: var(--color-background) !important;
}

body .mg2025-detail-layout .mg2025-sidebar h1.mg2025-name,
body .mg2025-detail-layout.mg2025-page-photo-detail h1.mg2025-name {
  color: var(--color-text) !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-avatar-container {
  width: 120px !important;
  height: 120px !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-avatar-container img.mg2025-avatar {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  border: 3px solid var(--color-border);
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .mg2025-comments-title,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-login-prompt p,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-item,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-author,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-text,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-date {
  color: var(--color-text) !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .mg2025-comments-title svg {
  color: var(--color-text-muted);
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-textarea {
  background-color: var(--color-background) !important;
  border: 1px solid var(--color-border) !important;
  color: var(--color-text) !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-textarea::placeholder {
  color: var(--color-text-muted) !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-char-count,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comments-empty {
  color: var(--color-text-muted) !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-login-prompt {
  background-color: var(--color-background-secondary) !important;
  border: 1px solid var(--color-border);
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-login-prompt a {
  color: var(--color-primary) !important;
  text-decoration: underline;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-submit-btn,
body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-reply-submit-btn {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-comments-section .comment-item {
  border-bottom-color: var(--color-border) !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-description-mobile {
  background: var(--color-background-secondary) !important;
  border: 1px solid var(--color-border);
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-description-title {
  color: var(--color-text) !important;
}

body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-description-content {
  color: var(--color-text-muted) !important;
}

@media (max-width: 991.98px) {
  body .mg2025-detail-layout.mg2025-page-photo-detail {
    display: flex !important;
    flex-direction: column !important;
  }

  body .mg2025-detail-layout.mg2025-page-photo-detail > .mg2025-main {
    order: 1 !important;
    width: 100% !important;
  }

  body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-gallery-container {
    padding: 0;
  }

  body .mg2025-detail-layout.mg2025-page-photo-detail .photo-detail-container {
    max-width: 100%;
    padding: 0;
  }

  body .mg2025-detail-layout.mg2025-page-photo-detail .photo-detail-image {
    max-height: none !important;
    width: 100% !important;
    border-radius: 0;
    box-shadow: none;
  }

  body .mg2025-detail-layout.mg2025-page-photo-detail .mg2025-gallery-toolbar {
    padding: 12px 16px 0;
  }
}
