/* /Components/GlobalSignature/SignatureTemplatePicker/SignatureTemplatePicker.razor.rz.scp.css */
/* New Signature Template dialog.
   A gallery: each template is its own preview card. Grid on the left, large
   preview + name + actions on the right.

   Scoped to this component, so the .stp__ prefix is belt-and-braces rather than
   the only thing keeping these rules out of the rest of the app. */

.stp[b-3mkyhp6qqm] {
    display: grid;
    /* Proportional with a floor and a ceiling: the preview pane never starves the
       grid on a small window, never sprawls on a large one. */
    grid-template-columns: minmax(0, 1fr) clamp(340px, 32%, 480px);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #4d4d4f;
}

.stp__pick[b-3mkyhp6qqm] {
    padding: 16px 20px 20px;
    border-right: 1px solid #d8dce0;
    min-width: 0;
}

.stp__side[b-3mkyhp6qqm] {
    padding: 16px 20px 20px;
    background: #f4f5f7;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------------------------------------------------------------- tabs --- */

.stp__tabs[b-3mkyhp6qqm] {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid #d8dce0;
    margin-bottom: 14px;
}

.stp__tab[b-3mkyhp6qqm] {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    font: 600 13.5px/1 inherit;
    color: #626f7c;
    padding: 10px 15px 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stp__tab:hover[b-3mkyhp6qqm] { color: #004878; }
.stp__tab.is-on[b-3mkyhp6qqm] { color: #004878; border-bottom-color: #004878; }
.stp__tab:focus-visible[b-3mkyhp6qqm] { outline: 2px solid #4297e7; outline-offset: -2px; }

.stp__count[b-3mkyhp6qqm] {
    font: 500 10.5px/1 Consolas, monospace;
    background: #e6e9ec;
    color: #626f7c;
    border-radius: 9px;
    padding: 3px 7px;
}

.stp__tab.is-on .stp__count[b-3mkyhp6qqm] { background: #dfeaf4; color: #004878; }

/* -------------------------------------------------------------- search --- */

.stp__search[b-3mkyhp6qqm] {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    border: 1px solid #d8dce0;
    border-radius: 3px;
    padding: 0 11px;
    margin-bottom: 14px;
}

.stp__search:focus-within[b-3mkyhp6qqm] {
    border-color: #4297e7;
    box-shadow: 0 0 0 2px rgba(66, 151, 231, .18);
}

.stp__search > i[b-3mkyhp6qqm] { color: #939598; font-size: 12px; flex: none; }

.stp__search input[b-3mkyhp6qqm] {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: none;
    font: 13.5px/1.3 inherit;
    color: #333;
    padding: 9px 0;
}

/* Chrome draws its own clear affordance on type=search; ours also resets the
   filter, so hide the native one. */
.stp__search input[b-3mkyhp6qqm]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.stp__clear[b-3mkyhp6qqm] {
    border: 0;
    background: none;
    cursor: pointer;
    color: #939598;
    font-size: 13px;
    line-height: 1;
    padding: 2px 0 2px 2px;
    flex: none;
}

.stp__clear:hover[b-3mkyhp6qqm] { color: #f15a29; }

/* ---------------------------------------------------------- card grid --- */

.stp__grid[b-3mkyhp6qqm] {
    display: grid;
    /* Intrinsic column count. A fixed count with viewport media queries crushed
       cards to 47px on a narrow window, because the query watched the viewport
       while the grid was the thing being squeezed. */
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    max-height: 560px;
    overflow-y: auto;
    padding: 2px;
    align-content: start;
}

.stp__card[b-3mkyhp6qqm] {
    border: 1px solid #d8dce0;
    border-radius: 4px;
    background: #fff;
    padding: 0;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.stp__card:hover[b-3mkyhp6qqm] {
    border-color: #4297e7;
    box-shadow: 0 3px 12px rgba(0, 72, 120, .14);
    transform: translateY(-1px);
}

.stp__card:focus-visible[b-3mkyhp6qqm] { outline: 2px solid #4297e7; outline-offset: 2px; }

.stp__card.is-on[b-3mkyhp6qqm] {
    border-color: #004878;
    box-shadow: 0 0 0 2px #004878 inset, 0 3px 12px rgba(0, 72, 120, .18);
}

.stp__thumb[b-3mkyhp6qqm] {
    height: 150px;
    background: #fff;
    border-bottom: 1px solid #e6e9ec;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

.stp__thumb img[b-3mkyhp6qqm] { width: 100%; height: auto; display: block; }

/* Hatched, so "no preview" reads as absent rather than broken. The old dialog
   rendered an empty <img src=""> here. */
.stp__thumb.is-blank[b-3mkyhp6qqm] {
    align-items: center;
    background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 8px, #f2f4f6 8px, #f2f4f6 16px);
}

.stp__noprev[b-3mkyhp6qqm] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #939598;
    font-size: 11px;
    text-align: center;
}

.stp__noprev i[b-3mkyhp6qqm] { font-size: 20px; opacity: .5; }

.stp__meta[b-3mkyhp6qqm] { padding: 9px 11px; display: flex; align-items: center; gap: 8px; }

.stp__name[b-3mkyhp6qqm] {
    font: 500 12.5px/1.3 inherit;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stp__tick[b-3mkyhp6qqm] {
    flex: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #004878;
    color: #fff;
    font-size: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stp__empty[b-3mkyhp6qqm] {
    grid-column: 1 / -1;
    border: 1px dashed #d8dce0;
    border-radius: 4px;
    padding: 44px 24px;
    text-align: center;
    color: #626f7c;
    font-size: 13.5px;
    background: #fcfdfd;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stp__empty b[b-3mkyhp6qqm] { color: #333; font-size: 14px; }

/* --------------------------------------------------------- right pane --- */

.stp__label[b-3mkyhp6qqm] {
    font: 600 10px/1 inherit;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #626f7c;
}

.stp__big[b-3mkyhp6qqm] {
    background: #fff;
    border: 1px solid #d8dce0;
    border-radius: 3px;
    min-height: 210px;
    max-height: 480px;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12px;
}

.stp__big img[b-3mkyhp6qqm] { width: 100%; height: auto; display: block; }

.stp__bignote[b-3mkyhp6qqm] {
    color: #939598;
    font-size: 12.5px;
    text-align: center;
    margin: auto;
    line-height: 1.6;
}

.stp__field[b-3mkyhp6qqm] { display: flex; flex-direction: column; gap: 6px; }

.stp__field input[b-3mkyhp6qqm] {
    border: 1px solid #d8dce0;
    border-radius: 3px;
    padding: 8px 10px;
    font: 13.5px/1.3 inherit;
    color: #333;
    background: #fff;
}

.stp__field input:focus[b-3mkyhp6qqm] {
    outline: none;
    border-color: #4297e7;
    box-shadow: 0 0 0 2px rgba(66, 151, 231, .18);
}

.stp__actions[b-3mkyhp6qqm] { margin-top: auto; display: flex; gap: 10px; }
.stp__actions .btn[b-3mkyhp6qqm] { flex: 1; margin: 0; }

.stp__actions .btn:disabled[b-3mkyhp6qqm] {
    background: #c2c8ce;
    border-color: #c2c8ce;
    color: #fff;
    cursor: not-allowed;
    opacity: 1;
}

/* Column count is intrinsic (auto-fill above), so no breakpoints are needed for
   it. Below this width there is no room for two panes at all. */
@media (max-width: 980px) {
    .stp[b-3mkyhp6qqm] { grid-template-columns: 1fr; }
    .stp__pick[b-3mkyhp6qqm] { border-right: none; border-bottom: 1px solid #d8dce0; }
    .stp__grid[b-3mkyhp6qqm] { max-height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
    .stp__card[b-3mkyhp6qqm] { transition: none; }
}
