/* finishes.aspx: public showcase of the plain wedding ring finishes.
   Every rule is scoped to .new-css (MasterPage2025) and prefixed fin-. No class name here contains
   the word "grid": style.css turns any class that does into display:grid.
   Sizes in the selector, the list and the viewer are in px rather than rem, because the site scales
   rem down to 40% on tablets and the ring photos and their captions should not shrink with it. */

/* ---- hero: a short band, not the full-height hero -------------------------------------- */

.new-css main.fin-hero {
  min-height: 0;
  height: auto;
  padding: calc(80px + 6rem) 0 6rem;   /* 80px: the fixed site header, which is see-through until scrolled */
  background: radial-gradient(60% 120% at 85% 0%, #0d7a52 0%, rgba(0, 61, 34, 0) 65%), #003d22;
}

.new-css main.fin-hero::before {
  display: none;
}

.new-css main.fin-hero .container {
  height: auto;
}

.new-css main.fin-hero .content {
  position: static;
  max-width: 90rem;
  margin: 0 auto;
  align-items: center;
  text-align: center;
}

.new-css main.fin-hero .content h1 {
  font-size: 5rem;
  line-height: 1.1;
}

.new-css .fin-section {
  padding: 5rem 0 8rem;
  background: #fff;   /* the ring photos and the swatches are on white */
}

/* ---- metal colour ------------------------------------------------------------------------ */

.new-css .fin-metals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
}

.new-css .fin-metal {
  position: relative;
  cursor: pointer;
}

/* the radio button stays in the page for the keyboard and screen readers; the swatch is what shows */
.new-css .fin-metal input {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.new-css .fin-metal-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px 3px 10px;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: border-color 0.2s;
}

.new-css .fin-metal-box img {
  display: block;
  width: 110px;
  height: 110px;
}

.new-css .fin-metal-name {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.3;
}

.new-css .fin-metal:hover .fin-metal-box {
  border-color: #003d2240;
}

.new-css .fin-metal input:checked + .fin-metal-box {
  border-color: #003d22;
}

.new-css .fin-metal input:focus-visible + .fin-metal-box {
  outline: 2px solid #00a478;
  outline-offset: 2px;
}

/* ---- diamond cut / hand engraved ---------------------------------------------------------- */

.new-css .fin-types {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  margin-top: 30px;
}

.new-css .fin-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.new-css .fin-type span {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.3;
}

.new-css .fin-type input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: #003d22;
  cursor: pointer;
}

.new-css .fin-type input:focus-visible {
  outline: 2px solid #00a478;
  outline-offset: 2px;
}

/* ---- the finishes ---------------------------------------------------------------------------- */

.new-css .fin-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 0;
  margin-top: 40px;
}

.new-css .fin-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 210px;
  padding: 3px 3px 8px;
  border: 2px solid transparent;
  border-radius: 5px;
  text-align: center;
  cursor: zoom-in;
  transition: border-color 0.2s;
}

/* only the finish type chosen with the radio buttons is on show */
.new-css .fin-root[data-type="N"] .fin-item[data-type="Y"],
.new-css .fin-root[data-type="Y"] .fin-item[data-type="N"] {
  display: none;
}

.new-css .fin-item img {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.new-css .fin-desc,
.new-css .fin-code {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.35;
}

.new-css .fin-desc {
  margin-top: 4px;
}

.new-css .fin-item:hover,
.new-css .fin-item:focus-visible {
  border-color: #003d22;
}

/* ---- full-screen viewer (finishes.js adds it to <body>) -------------------------------------- */

html.fin-lock,
html.fin-lock body {
  overflow: hidden !important;
}

.new-css .fin-viewer {
  position: fixed;
  inset: 0;
  z-index: 100001;   /* above the site header (9999) */
  display: none;
  flex-direction: column;
  background: #fff;  /* the ring photos are on white, so the photo runs to the edges of the screen */
}

.new-css .fin-viewer.is-open {
  display: flex;
}

.new-css .fin-viewer-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 20px;
  border-bottom: 1px solid #0000001a;
}

.new-css .fin-viewer-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  min-width: 0;
}

.new-css .fin-viewer-desc {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.new-css .fin-viewer-meta {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.new-css .fin-viewer-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  cursor: zoom-out;
}

/* Sized to the stage rather than to the file, so the thumbnail shown while the large photo
   downloads sits exactly where the large photo will. */
.new-css .fin-viewer-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transition: filter 0.25s;
}

.new-css .fin-viewer.is-loading .fin-viewer-img {
  filter: blur(6px);
}

/* the site styles every <button> as a wide green call to action, hover included */
.new-css .fin-viewer-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: #ffffffd9;
  cursor: pointer;
  transition: background 0.2s;
}

.new-css .fin-viewer-btn:hover {
  background: #0000000f !important;
  border-color: transparent !important;
}

.new-css .fin-viewer-btn i {
  font-size: 24px;
  color: #1d1813;
}

.new-css .fin-viewer-btn:focus-visible {
  outline: 2px solid #00a478;
  outline-offset: 2px;
}

.new-css .fin-viewer-prev,
.new-css .fin-viewer-next {
  position: absolute;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
}

.new-css .fin-viewer-prev {
  left: 12px;
}

.new-css .fin-viewer-next {
  right: 12px;
}

/* ---- phones ---------------------------------------------------------------------------------- */

@media (max-width: 660px) {
  .new-css main.fin-hero {
    padding: calc(80px + 4rem) 0 4rem;
  }

  .new-css main.fin-hero .content h1 {
    font-size: 3.2rem;
  }

  .new-css .fin-section {
    padding: 3rem 0 6rem;
  }

  .new-css .fin-metal-box img {
    width: 90px;
    height: 90px;
  }

  .new-css .fin-types {
    margin-top: 20px;
  }

  .new-css .fin-list {
    margin-top: 26px;
  }

  .new-css .fin-viewer-bar {
    padding-left: 14px;
  }

  .new-css .fin-viewer-prev {
    left: 6px;
  }

  .new-css .fin-viewer-next {
    right: 6px;
  }
}

/* two finishes to a row once three no longer fit */
@media (max-width: 480px) {
  .new-css .fin-item {
    width: 50%;
  }

  .new-css .fin-desc,
  .new-css .fin-code {
    font-size: 14px;
  }
}
