/*
 * TAO Platform — interior pages and editorial content.
 * Loaded after app.css so it can safely normalize inherited/legacy content.
 */

:root {
  --tao-shell: min(1380px, calc(100% - clamp(48px, 8vw, 160px)));
  --tao-content: min(820px, 100%);
  --tao-control-height: 52px;
}

.tao-content-area,
.tao-page,
.tao-catalog-page,
.tao-auctions-page,
.tao-artists-index,
.tao-artist-profile,
.tao-events-page {
  min-width: 0;
}

.tao-content-area,
.tao-page {
  padding-bottom: clamp(90px, 10vw, 160px);
}

.tao-page-header,
.tao-archive-hero {
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(52px, 7vw, 100px);
}

.tao-page-header {
  max-width: 1120px;
}

.tao-page-header h1,
.tao-archive-hero h1 {
  text-wrap: balance;
}

.tao-page-header > p:last-child,
.tao-archive-description {
  max-width: 720px;
  color: var(--tao-muted);
  font-size: clamp(16px, 1.4vw, 20px);
}

.tao-page-cover {
  margin: 0 0 clamp(50px, 7vw, 96px);
  overflow: hidden;
  border-radius: var(--tao-radius);
  background: var(--tao-soft);
}

.tao-page-cover img {
  width: 100%;
  max-height: 78vh;
  object-fit: cover;
}

.tao-page__content {
  min-width: 0;
}

.tao-page:not(.tao-page--commerce) .tao-page__content {
  margin-inline: auto;
}

.tao-page--commerce {
  padding-bottom: clamp(100px, 10vw, 170px);
}

.tao-page-header--commerce {
  padding-bottom: clamp(36px, 5vw, 64px);
}

.tao-page-header--commerce h1 {
  font-size: clamp(56px, 7vw, 104px);
}

.tao-page__content--commerce {
  width: 100%;
  max-width: none;
}

.tao-prose {
  width: var(--tao-content);
  max-width: 100%;
  margin-inline: auto;
  overflow-wrap: anywhere;
}

.tao-prose > :first-child {
  margin-top: 0;
}

.tao-prose > :last-child {
  margin-bottom: 0;
}

.tao-prose p,
.tao-prose li {
  line-height: 1.75;
}

.tao-prose ul,
.tao-prose ol {
  padding-left: 1.25em;
}

.tao-prose hr {
  margin: 3.5em 0;
  border: 0;
  border-top: 1px solid var(--tao-line);
}

.tao-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5em 0;
  font-size: 14px;
}

.tao-prose th,
.tao-prose td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--tao-line);
  text-align: left;
  vertical-align: top;
}

.tao-prose th {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tao-prose figure,
.tao-prose .wp-block-image,
.tao-prose .wp-block-gallery,
.tao-prose .wp-block-embed {
  margin-top: clamp(32px, 5vw, 64px);
  margin-bottom: clamp(32px, 5vw, 64px);
}

.tao-prose figcaption {
  margin-top: 10px;
  color: var(--tao-muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  line-height: 1.5;
}

.tao-prose .alignwide {
  width: min(1120px, calc(100vw - 48px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.tao-prose .alignfull {
  width: 100vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.tao-prose .wp-block-columns {
  gap: clamp(24px, 4vw, 64px);
}

.tao-prose .wp-block-button__link,
.tao-prose input[type="submit"],
.tao-prose button[type="submit"] {
  min-height: var(--tao-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tao-ink);
  border-radius: 999px;
  background: var(--tao-ink);
  color: #fff;
  padding: 0 24px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.tao-prose input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.tao-prose textarea,
.tao-prose select,
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  min-height: var(--tao-control-height);
  border: 1px solid var(--tao-line);
  border-radius: 10px;
  background: #fff;
  color: var(--tao-ink);
  padding: 13px 15px;
  outline: 0;
}

.tao-prose textarea,
.wpcf7 textarea {
  min-height: 150px;
  resize: vertical;
}

.tao-prose input:focus,
.tao-prose textarea:focus,
.tao-prose select:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  border-color: var(--tao-ink);
  box-shadow: 0 0 0 3px rgba(17,17,17,.08);
}

.wpcf7 form {
  display: grid;
  gap: 18px;
}

.wpcf7 form p {
  margin: 0;
}

.wpcf7 label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
}

.wpcf7 .wpcf7-not-valid-tip {
  margin-top: 5px;
  color: #b42318;
  font-size: 11px;
}

.wpcf7 form .wpcf7-response-output {
  margin: 10px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--tao-line);
  border-radius: 10px;
}

/* Prevent old page-builder fragments from forcing the new layouts off-canvas. */
.tao-platform .cmsmasters_row,
.tao-platform .cmsmasters_row_outer,
.tao-platform .cmsmasters_row_outer_parent,
.tao-platform .cmsmasters_row_inner,
.tao-platform .middle_content,
.tao-platform .content_wrap {
  max-width: 100%;
}

.tao-platform .tao-archive-description .cmsmasters_row,
.tao-platform .tao-archive-description .wpb_row {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.tao-archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.tao-platform-content {
  overflow: hidden;
}

.tao-platform-content > .woocommerce,
.tao-platform-content > form,
.tao-platform-content > [class*="tao-"] {
  max-width: 100%;
}

/* Editorial cards and grids need breathing room on archive pages. */
.tao-post-grid,
.tao-artwork-grid,
.tao-auction-grid,
.tao-artist-grid {
  min-width: 0;
}

.tao-post-card,
.tao-artwork-card,
.tao-auction-card,
.tao-artist-card {
  min-width: 0;
}

.tao-post-card__body h2,
.tao-artwork-card__body h3,
.tao-auction-card__body h3 {
  overflow-wrap: anywhere;
}

/* Cookie banners should not cover the app navigation on small screens. */
@media (max-width: 782px) {
  :root {
    --tao-shell: calc(100% - 32px);
  }

  .tao-content-area,
  .tao-page {
    padding-bottom: 110px;
  }

  .tao-page-header,
  .tao-archive-hero {
    padding-top: 52px;
    padding-bottom: 48px;
  }

  .tao-page-header h1,
  .tao-archive-hero h1,
  .tao-page-header--commerce h1 {
    font-size: clamp(48px, 15vw, 70px);
  }

  .tao-prose .alignwide,
  .tao-prose .alignfull {
    width: calc(100vw - 28px);
  }

  .tao-archive-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tao-archive-actions .tao-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --tao-shell: calc(100% - 24px);
  }

  .tao-prose table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* TAO bidder account status */
.tao-bidder-cta {
    gap: 12px;
}

.tao-bidder-status {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px 18px;
    border: 1px solid currentColor;
    border-radius: 18px;
    background: #f1eee7;
    color: #58564f;
}

.tao-bidder-status__dot {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 14%, transparent);
}

.tao-bidder-status strong,
.tao-bidder-status small {
    display: block;
}

.tao-bidder-status strong {
    font-size: 14px;
    line-height: 1.2;
}

.tao-bidder-status small {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.35;
    color: inherit;
    opacity: .8;
}

.tao-bidder-cta--approved .tao-bidder-status {
    background: #e8f5ec;
    color: #176a39;
}

.tao-bidder-cta--pending .tao-bidder-status {
    background: #fff4d6;
    color: #8a5a00;
}

.tao-bidder-cta--rejected .tao-bidder-status {
    background: #fde9e7;
    color: #a3312b;
}

.tao-button--muted {
    cursor: default;
    pointer-events: none;
    border-color: #d4d0c7;
    background: #e7e3da;
    color: #77736c;
}

@supports not (color: color-mix(in srgb, black 10%, transparent)) {
    .tao-bidder-status__dot {
        box-shadow: 0 0 0 5px rgba(0, 0, 0, .08);
    }
}
