/* Build Your Own page ([topper_build_your_own]) */

.topper-byo {
    --byo-red: #e30613;
    --byo-red-dark: #b8050f;
    --byo-ink: #111;
    --byo-muted: #666;
    --byo-line: #d9dde3;
    --byo-panel: #f1f2f4;
    color: var(--byo-ink);
    font-size: 16px;
    line-height: 1.5;
    /* Break out of the theme / Elementor content column so the banner and
       the page span the full browser width. */
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
/* No gap between the header and the banner: remove the top padding Elementor
   adds to the column holding the shortcode. */
.elementor-column-gap-default > .elementor-column > .elementor-element-populated:has(.topper-byo),
.topper-byo-page .elementor-column > .elementor-element-populated:has(.topper-byo) {
    padding-top: 0;
}
/* 100vw includes the scrollbar on Windows; stop it causing a sideways scroll. */
html:has(.topper-byo),
body:has(.topper-byo),
body.topper-byo-page {
    overflow-x: clip;
}

/* The layout uses bold headings; the theme's are light. */
.topper-byo h1,
.topper-byo h2,
.topper-byo h3,
.topper-byo h4 {
    color: inherit;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
}
/* Banner text stays white whatever the site's global heading colour is. */
.topper-byo .byo-hero,
.topper-byo .byo-hero h1,
.topper-byo .byo-hero p {
    color: #fff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.topper-byo .byo-num {
    color: var(--byo-red);
}

.topper-byo *,
.topper-byo *::before,
.topper-byo *::after {
    box-sizing: border-box;
}

.topper-byo [hidden] {
    display: none !important;
}

.topper-byo .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Top banner */
.byo-hero {
    position: relative;
    background: #0b1a2b center / cover no-repeat;
    color: #fff;
}
/* Shading behind the text runs the full width of the banner, from the left
   edge of the screen, so there is no visible box edge on wide screens. */
.byo-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3) 45%, rgba(0, 0, 0, 0) 75%);
    pointer-events: none;
}
.topper-byo .byo-hero-inner {
    position: relative;
    max-width: 1600px;
    margin: 0 auto;
    padding: 135px 40px;
    background: none !important;
}
/* Mobile and iPad: keep the boat (right of the photo) in view. */
@media (max-width: 1024px) {
    .byo-hero {
        background-position: right;
    }
}
.byo-hero h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
}
.byo-hero-subtitle {
    max-width: 480px;
    margin: 0 0 12px;
    font-size: clamp(20px, 2.6vw, 28px);
    font-style: italic;
    line-height: 1.25;
}
.byo-hero-note {
    margin: 0;
    font-size: 14px;
    font-style: italic;
}

.byo-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px 40px 50px;
}

/* Steps */
.byo-step {
    margin: 0 0 40px;
    scroll-margin-top: 120px;
}
.byo-step h2 {
    margin: 0 0 4px;
    font-size: clamp(26px, 3.2vw, 34px);
    line-height: 1.2;
}
.byo-panel {
    padding: 24px;
    background: var(--byo-panel);
    border-radius: 6px;
}
.byo-intro,
.byo-hint,
.byo-note {
    color: var(--byo-muted);
    font-style: italic;
}
.byo-intro {
    margin: 0 0 16px;
}
.byo-hint {
    margin: 4px 0 0;
    font-size: 14px;
}
.byo-note {
    margin: 12px 0 0;
    font-size: 14px;
}
.byo-uk-note {
    margin: -8px 0 16px;
    font-size: 14px;
    font-style: italic;
}
.byo-choosing {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 12px;
    background: #fdeced;
    border-left: 3px solid var(--byo-red);
    font-weight: 600;
}

/* 1. Boat tiles. Selectors are doubled up (.topper-byo .byo-…) and some
   rules marked !important so the theme's and Elementor's own button and
   image styles can't change the tile shape. */
.topper-byo .byo-tiles {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}
.topper-byo .byo-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
    background: #fff !important;
    border: 2px solid var(--byo-line) !important;
    border-radius: 6px !important;
    color: var(--byo-ink) !important;
    font: inherit;
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.topper-byo .byo-tile:hover,
.topper-byo .byo-tile:focus-visible {
    border-color: #9aa3ad !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}
.topper-byo .byo-tile:focus-visible {
    outline: 3px solid var(--byo-ink);
    outline-offset: 2px;
}
.topper-byo .byo-tile.is-selected {
    border-color: var(--byo-red) !important;
    box-shadow: 0 0 0 1px var(--byo-red), 0 6px 16px rgba(227, 6, 19, 0.18);
}
.topper-byo .byo-tile.is-selected .byo-tile-name {
    background: var(--byo-red);
    color: #fff;
}
.topper-byo .byo-tile.is-selected .byo-tile-from {
    color: rgba(255, 255, 255, 0.85);
}
.topper-byo .byo-tile.is-selected::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    z-index: 1;
    background: var(--byo-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 16px no-repeat;
    box-shadow: 0 0 0 2px #fff;
}
/* Every photo is cropped to the same 4:3 shape, whatever its size. */
.topper-byo .byo-tile-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e7eaee;
}
.topper-byo .byo-tile-image img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0;
    border: 0;
    border-radius: 0;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s;
}
.topper-byo .byo-tile:hover .byo-tile-image img {
    transform: scale(1.04);
}
.topper-byo .byo-tile-name {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 14px 10px;
    border-top: 1px solid var(--byo-line);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 0.15s, color 0.15s;
}
.topper-byo .byo-tile-from {
    color: var(--byo-muted);
    font-size: 15px;
    font-weight: 400;
}

/* 2. Versions and accessories */
.byo-build {
    margin: 0 0 16px;
    background: #fff;
    border: 1px solid var(--byo-line);
    border-radius: 6px;
}
.byo-build.is-active {
    padding: 20px;
}
.byo-build.is-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 12px 20px;
}
.byo-build-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}
.byo-build-head h3 {
    margin: 0;
    font-size: 20px;
}
.byo-build-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
}
.byo-empty {
    margin: 0;
    color: var(--byo-muted);
}
.byo-build-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 20px 40px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--byo-line);
}
.byo-price-line {
    margin: 8px 0 0;
}
.byo-acc-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    margin: 16px 0 10px;
}
.byo-acc-head h4 {
    margin: 0;
    font-size: 18px;
}
.topper-byo .byo-acc-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.byo-acc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.byo-acc-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    cursor: pointer;
}
.byo-acc-label input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--byo-red);
}
.byo-acc-price {
    color: var(--byo-muted);
    font-size: 14px;
}

.byo-stepper {
    display: inline-flex;
    flex: none;
    border: 1px solid var(--byo-line);
    border-radius: 4px;
    background: #fff;
}
.topper-byo .byo-stepper button {
    width: 40px;
    min-height: 40px;
    padding: 0;
    background: #fff;
    border: 0;
    border-radius: 0;
    color: var(--byo-ink);
    font-size: 20px;
    line-height: 1;
}
.topper-byo .byo-stepper button:hover:not(:disabled) {
    background: var(--byo-panel);
    color: var(--byo-ink);
}
.topper-byo .byo-stepper button:disabled {
    opacity: 0.35;
    cursor: default;
}
.topper-byo .byo-stepper input {
    width: 56px;
    min-height: 40px;
    padding: 0 4px;
    border: 0;
    border-left: 1px solid var(--byo-line);
    border-right: 1px solid var(--byo-line);
    border-radius: 0;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}
.byo-stepper input::-webkit-outer-spin-button,
.byo-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.topper-byo .byo-add,
.topper-byo .byo-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 18px;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}
.topper-byo .byo-add {
    background: #fff;
    border: 2px solid var(--byo-red);
    color: var(--byo-red);
}
.topper-byo .byo-add:hover,
.topper-byo .byo-add:focus-visible {
    background: var(--byo-red);
    color: #fff;
}
.byo-add span {
    font-size: 26px;
    line-height: 1;
}

.topper-byo .byo-link {
    padding: 0;
    background: none;
    border: 0;
    color: var(--byo-red);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}
.topper-byo .byo-link:hover,
.topper-byo .byo-link:focus-visible {
    background: none;
    color: var(--byo-red-dark);
}

/* Fields */
.byo-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 30px;
}
.byo-field {
    margin: 0;
}
.byo-field label,
.byo-label {
    display: block;
    margin: 0 0 6px;
    font-weight: 700;
}
.byo-field label em {
    font-weight: 400;
}
.topper-byo input[type="text"],
.topper-byo input[type="email"],
.topper-byo input[type="tel"],
.topper-byo select,
.topper-byo textarea {
    width: 100%;
    min-height: 46px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #c5cbd3;
    border-radius: 4px;
    font-size: 16px;
}
.topper-byo input[readonly] {
    background: #f7f8f9;
}
.topper-byo [aria-invalid="true"] {
    border-color: var(--byo-red);
    box-shadow: 0 0 0 1px var(--byo-red);
}
.byo-required {
    color: var(--byo-red);
}

/* 3. Delivery or collection */
.byo-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 40px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}
.byo-radios label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.byo-radios input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--byo-red);
}
.byo-address {
    padding: 12px 16px;
    background: var(--byo-panel);
    border: 1px solid var(--byo-line);
    border-radius: 4px;
    font-style: normal;
    line-height: 1.45;
}
.byo-address::first-line {
    font-weight: 700;
}

/* 6. Review */
.byo-review {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 30px;
}
.byo-review h3 {
    margin: 0 0 10px;
    font-size: 20px;
}
.byo-table-wrap {
    overflow-x: auto;
}
.topper-byo .byo-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: #fff;
    font-size: 15px;
}
.topper-byo .byo-table th,
.topper-byo .byo-table td {
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--byo-line);
    text-align: left;
    vertical-align: middle;
}
.topper-byo .byo-table thead th {
    background: #e4e7eb;
}
.byo-table tbody th {
    font-weight: 400;
}
.byo-table tbody th small {
    display: block;
    color: var(--byo-muted);
}
.byo-row-boat th,
.byo-row-boat td {
    font-weight: 700;
}
.byo-totals {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 20px;
    max-width: 440px;
    margin: 16px 0 0;
}
.byo-totals dt,
.byo-totals dd {
    margin: 0;
}
.byo-totals dd {
    font-weight: 700;
    text-align: right;
}
.byo-totals .byo-grand {
    margin-top: 6px;
    color: var(--byo-red);
    font-size: 22px;
    font-weight: 700;
}
.byo-warning {
    padding: 8px 12px;
    background: #fff4e5;
    border-left: 3px solid #e08a00;
}
.byo-review-side {
    padding-left: 24px;
    border-left: 1px solid var(--byo-line);
}
.byo-detail {
    padding: 0 0 14px;
    margin: 0 0 14px;
    border-bottom: 1px solid var(--byo-line);
}
.byo-detail:last-child {
    border-bottom: 0;
}
.byo-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.byo-detail h4 {
    margin: 0 0 4px;
    font-size: 16px;
}
.byo-detail p {
    margin: 0;
    color: var(--byo-muted);
    overflow-wrap: anywhere;
}

.byo-errors {
    margin: 20px 0 0;
    padding: 12px 16px;
    background: #fdeced;
    border-left: 4px solid var(--byo-red);
}
.byo-errors p,
.byo-errors ul {
    margin: 0;
}
.byo-errors a {
    color: var(--byo-red-dark);
}

.byo-submit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin: 16px 0 0;
    text-align: right;
}
.topper-byo .byo-submit {
    min-width: 260px;
    justify-content: center;
    background: var(--byo-red);
    border: 0;
    color: #fff;
}
.topper-byo .byo-submit:hover,
.topper-byo .byo-submit:focus-visible {
    background: var(--byo-red-dark);
    color: #fff;
}
.topper-byo .byo-submit:disabled {
    opacity: 0.7;
}
.byo-small {
    margin: 0;
    color: var(--byo-muted);
    font-size: 14px;
}
.byo-small a {
    color: var(--byo-red);
}

/* Step-by-step: progress bar */
.byo-progress {
    margin: 0 0 30px;
    scroll-margin-top: 120px;
}
.topper-byo .byo-progress ol {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}
.byo-progress li {
    position: relative;
    flex: 1;
    margin: 0;
}
/* Line joining the step circles */
.byo-progress li + li::before {
    content: "";
    position: absolute;
    top: 18px;
    right: 50%;
    width: 100%;
    height: 3px;
    background: var(--byo-line);
}
.byo-progress li.is-done::before,
.byo-progress li.is-current::before {
    background: var(--byo-red);
}
.topper-byo .byo-progress button {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0 4px !important;
    background: none !important;
    border: 0 !important;
    color: var(--byo-muted) !important;
    font: inherit;
    font-size: 14px;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}
.topper-byo .byo-progress button:disabled {
    cursor: default;
    opacity: 0.6;
}
.byo-progress-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 3px solid var(--byo-line);
    border-radius: 50%;
    background: #fff;
    color: var(--byo-muted);
    font-weight: 700;
}
.byo-progress li.is-done .byo-progress-num {
    border-color: var(--byo-red);
    background: var(--byo-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 18px no-repeat;
    color: transparent;
}
.byo-progress li.is-current .byo-progress-num {
    border-color: var(--byo-red);
    color: var(--byo-red);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.15);
}
.topper-byo .byo-progress li.is-current button,
.topper-byo .byo-progress li.is-done button {
    color: var(--byo-ink) !important;
}
.byo-progress li.is-current .byo-progress-name {
    font-weight: 700;
}
.topper-byo .byo-progress button:not(:disabled):hover .byo-progress-name {
    text-decoration: underline;
}
.byo-progress-mobile {
    display: none;
    margin: 10px 0 0;
    font-weight: 700;
    text-align: center;
}

/* Step-by-step: Back / Next bar at the foot of each step */
.byo-step-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin: 30px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--byo-line);
}
.byo-running {
    flex: 1;
    margin: 0;
    color: var(--byo-muted);
    text-align: right;
}
/* The review already shows the totals in full. */
#byo-step-6 .byo-running {
    visibility: hidden;
}
.byo-running strong {
    color: var(--byo-ink);
    font-size: 18px;
}
.topper-byo .byo-next,
.topper-byo .byo-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 10px 26px !important;
    border-radius: 4px !important;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}
.topper-byo .byo-next {
    background: var(--byo-red) !important;
    border: 0 !important;
    color: #fff !important;
}
.topper-byo .byo-next:hover,
.topper-byo .byo-next:focus-visible {
    background: var(--byo-red-dark) !important;
}
.topper-byo .byo-back {
    background: #fff !important;
    border: 1px solid #c5cbd3 !important;
    color: var(--byo-ink) !important;
}
.topper-byo .byo-back:hover,
.topper-byo .byo-back:focus-visible {
    border-color: var(--byo-ink) !important;
}
.byo-step h2:focus {
    outline: none;
}
.byo-optional {
    color: var(--byo-muted);
    font-size: 0.6em;
    font-weight: 400;
}

/* Step 2: picture of the chosen boat beside the version choice */
.byo-build-top {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.byo-version-note {
    margin: 16px 0 0;
    padding: 20px;
    background: #f4f4f4;
    font-style: italic;
    font-weight: bold;
}
.byo-build-top .byo-build-grid {
    flex: 1;
}
.topper-byo .byo-build-image {
    flex: none;
    width: 200px;
    height: auto !important;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    object-fit: cover;
}

@media (max-width: 1000px) {
    .topper-byo .byo-tiles {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .topper-byo .byo-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .byo-review {
        grid-template-columns: minmax(0, 1fr);
    }
    .byo-review-side {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 700px) {
    .topper-byo .byo-hero-inner {
        padding: 60px 16px;
    }
    .byo-hero::before {
        background: rgba(0, 0, 0, 0.4);
    }
    .byo-container {
        padding: 24px 16px 40px;
    }
    .topper-byo .byo-tile-name {
        padding: 10px 8px;
    }
    .byo-panel {
        padding: 16px;
    }
    .byo-build.is-active {
        padding: 16px;
    }
    .topper-byo .byo-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .topper-byo .byo-tile-name {
        font-size: 15px;
    }
    .byo-build-grid,
    .topper-byo .byo-acc-list,
    .byo-fields {
        grid-template-columns: minmax(0, 1fr);
    }
    .byo-acc-price {
        flex-basis: 100%;
    }
    .topper-byo .byo-submit {
        width: 100%;
    }
    /* Just the numbered circles, with the current step named underneath */
    .byo-progress-name {
        display: none;
    }
    .byo-progress-mobile {
        display: block;
    }
    .byo-progress-num {
        width: 32px;
        height: 32px;
    }
    .byo-progress li + li::before {
        top: 15px;
    }
    .byo-step-nav {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .byo-running {
        text-align: center;
    }
    .topper-byo .byo-build-image {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .topper-byo * {
        transition: none !important;
    }
}
