/* Explicit stylesheet for the new-boat flow. Kept separate so it is reliably
   cache-busted even when an old generated scoped-CSS bundle is cached. */
.boats-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 16px;
}

.boats-page-heading h5 { margin: 0; font-size: 1.35rem; font-weight: 700; }

/* Egen klass för navigationshuvudet så att MainLayouts generella .top-row-regler
   inte kan råka dölja menyn. */
.sidebar .nav-menu-header {
    display: flex !important;
    visibility: visible !important;
    width: 100%;
    min-height: 3.5rem;
    align-items: center;
}

.new-boat {
    width: 100%;
    margin: 0 0 20px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid #d6e0ea;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(18, 42, 66, .10);
}

.new-boat__header, .new-boat__actions, .new-boat__selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.new-boat__header h4 { margin: 2px 0 0; color: #172b3f; font-size: 1.35rem; font-weight: 700; }
.new-boat__eyebrow { color: #64788c; font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.new-boat__close {
    display: inline-grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #edf2f7;
    color: #40566b;
    font-size: 29px;
    line-height: 1;
}
.new-boat__close:hover, .new-boat__close:focus-visible { background: #dfe8f1; color: #15293c; outline: 3px solid rgba(13,110,253,.2); }

.new-boat__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 20px 0 24px;
    padding: 0;
    list-style: none;
    color: #718096;
    font-size: .78rem;
}
.new-boat__steps li {
    display: flex;
    min-width: 0;
    padding: 0 2px 11px;
    align-items: center;
    justify-content: center;
    border-bottom: 4px solid #e1e8ef;
    white-space: nowrap;
}
.new-boat__steps li::marker { content: ""; }
.new-boat__steps span {
    display: inline-grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-right: 5px;
    place-items: center;
    border-radius: 50%;
    background: #e8edf2;
    color: #617386;
    font-weight: 800;
}
.new-boat__steps .is-active { border-color: #176fc1; color: #155e9e; font-weight: 800; }
.new-boat__steps .is-active span, .new-boat__steps .is-complete span { background: #176fc1; color: #fff; }
.new-boat > .text-muted { margin-bottom: 14px; color: #5e7081 !important; font-size: .95rem; }

.new-boat__template-list { display: grid; gap: 10px; margin: 0; }
.new-boat__template {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 2px 9px;
    width: 100%;
    min-height: 66px;
    padding: 11px 12px;
    align-items: center;
    border: 2px solid #dce4eb;
    border-radius: 9px;
    background: #fff;
    color: #24384b;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.new-boat__template:hover, .new-boat__template:focus-visible {
    border-color: #77aee0;
    background: #f7fbff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(23,111,193,.13);
}
.new-boat__template.is-selected { border-color: #176fc1; background: #eef7ff; box-shadow: 0 0 0 3px rgba(23,111,193,.13); }
.new-boat__template-check {
    display: inline-grid;
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 2px solid #aab8c5;
    border-radius: 50%;
    color: transparent;
    font-size: 14px;
    font-weight: 900;
}
.new-boat__template.is-selected .new-boat__template-check { border-color: #176fc1; background: #176fc1; color: #fff; }
.new-boat__template-name { grid-column: 2; font-size: .97rem; font-weight: 700; line-height: 1.25; }
.new-boat__template-model { grid-column: 2; color: #637587; font-size: .84rem; }
.new-boat__template-id {
    grid-column: 3;
    grid-row: 1 / span 2;
    padding: 4px 7px;
    border-radius: 5px;
    background: #edf1f5;
    color: #637587;
    font-size: .72rem;
    white-space: nowrap;
}

.new-boat__actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e6ecf1; }
.new-boat__actions .btn { min-width: 104px; min-height: 44px; padding: 9px 17px; border-radius: 8px; font-weight: 700; }
.new-boat__status { display: flex; min-height: 90px; align-items: center; justify-content: center; gap: 10px; color: #52677b; }
.new-boat__selected { margin-bottom: 18px; padding: 12px 14px; border-left: 4px solid #176fc1; border-radius: 7px; background: #eef4f9; }
.new-boat .form-label { color: #2d4052; font-weight: 700; }
.new-boat .form-control { min-height: 48px; border: 2px solid #cbd6df; border-radius: 8px; }
.new-boat .form-control:focus { border-color: #176fc1; box-shadow: 0 0 0 3px rgba(23,111,193,.16); }
.new-boat .new-boat__note {
    min-height: 13rem;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.45;
    white-space: pre-wrap;
}
.new-boat__summary { margin: 15px 0 0; border-top: 1px solid #e2e8ee; }
.new-boat__summary div { display: grid; grid-template-columns: minmax(105px,38%) 1fr; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #e2e8ee; }
.new-boat__summary dt, .new-boat__summary dd { margin: 0; }
.new-boat__summary dt { color: #687b8d; font-weight: 600; }
.new-boat__summary dd { color: #24384b; font-weight: 700; overflow-wrap: anywhere; white-space: pre-wrap; }

@media (max-width: 520px) {
    .boats-page-heading { margin-top: 2px; }
    .new-boat { padding: 16px 12px; border-radius: 10px; }
    .new-boat__steps { gap: 3px; margin: 17px 0 21px; font-size: .68rem; }
    .new-boat__steps li { flex-direction: column; gap: 4px; padding-bottom: 8px; }
    .new-boat__steps span { margin: 0; }
    .new-boat__template { grid-template-columns: 27px minmax(0, 1fr); }
    .new-boat__template-id { grid-column: 2; grid-row: 3; width: max-content; margin-top: 4px; }
    .new-boat__template-check { grid-row: 1 / span 3; }
    .new-boat__actions { gap: 9px; }
    .new-boat__actions .btn { flex: 1 1 0; min-width: 0; padding-right: 10px; padding-left: 10px; }
}
