.molding-search {
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem;
    font-family: system-ui, sans-serif;
    color: #222;
}

.search-header {
    margin-bottom: 1rem;
}

.search-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 5vw, 2.25rem);
}

.search-header h3{
    font-size: 1.25;
    color: #1747D6;
}

.search-header p {
    margin: .35rem 0 0;
    color: #666;
}

.search-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.search-card h2 {
    font-size: 1.25rem;
    margin: 0 0 .85rem;
}
.type-header{
    display: grid !important;
    grid-template-columns: 1fr 1fr;

}

.header-right{
    text-align: right;
}
.header-right button {
    width:32px;
    height:32px;
}

label {
    display: block;
    font-weight: 600;
}

label span {
    /*display: block;*/
    margin-bottom: .35rem;
}

input,
select,
button {
    width: 100%;
    font: inherit;
    min-height: 46px;
    border-radius: 10px;
}

input,
select {
    border: 1px solid #bbb;
    padding: .65rem .75rem;
    background: #fff;
}

small {
    display: block;
    margin-top: .35rem;
    color: #1747D6;
    font-weight: 400;
}

.field-grid {
    display: grid;
    gap: .85rem;
}

.field-grid.two {
    grid-template-columns: 1fr;
}

.input-unit {
    display: flex;
    align-items: center;
    border: 1px solid #bbb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.input-unit input {
    border: 0;
    border-radius: 0;
}

.input-unit span {
    margin: 0;
    padding: 0 .75rem;
    color: #666;
    white-space: nowrap;
}

.chip-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
    text-align: center;
}

.single-chip{
    display: grid;
    grid-template-columns: 1fr !important;
}
.chip-group label,
.segmented label {
    position: relative;
}

.chip-group input,
.segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-group span,
.segmented span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid #bbb;
    border-radius: 999px;
    padding: .5rem .75rem;
    background: #f8f8f8;
    cursor: pointer;
}

.chip-group input:checked + span,
.segmented input:checked + span {
    background: #222;
    color: #fff;
    border-color: #222;
}

.segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}

.search-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, #fff 80%, rgba(255,255,255,0));
    padding: 1rem 0 .5rem;
    text-align: center;
}

.search-actions button {
    border: 0;
    background: #222;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.search-actions a {
    display: inline-block;
    margin-top: .75rem;
    color: #444;
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-item input {
    width: 25px;
    height: 25px;/* overrides your global input { width: 100% } */
    min-height: auto;     /* prevents stretching */
    margin: 1rem;
}
.size-title{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}
.size-title h2{
  text-align: left;
}
#matchSizeHelpBtn{
    display: inline-block;
    text-align: right;
}
#matchSizeHelpBtn img{
    width:2rem;
}
.dimensions-image{
    text-align: center;
}

.modal__container{
    margin-bottom: 3rem;
    margin-top: 1rem;
    /*z-index: 1001;*/
}

.modal__container.size-picker{
    width: 433px;
    height: 433px;
    /*padding: 2rem;*/
    background-color: var(--bgd-light);
}

#size-picker-title{
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    width: 100%;
}

.modal-actions{
    margin-bottom:2rem;
}


.type-list-container {
    width: min(92vw, 850px) !important;
    max-width: 850px !important;
    flex-basis: min(92vw, 850px) !important;
}
.type-list{
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .35rem 1.5rem;
    width: 100%;
}

.field_error{
    color: var(--important);
}

.match-request-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.25rem;
    background: #fff;
    border-radius: 12px;
}

.match-request-card h2 {
    margin-top: 0;
}

.match-request-intro {
    margin-bottom: 1rem;
}

.match-summary {
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    background: #f6f3ef;
    border-left: 4px solid #8a6a43;
    border-radius: 6px;
}

.summary-label {
    display: block;
    font-size: .85rem;
    opacity: .75;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .85rem;
}

.contact-grid label,
.comments-label {
    display: block;
    font-weight: 600;
}

.contact-grid input,
.comments-label textarea {
    width: 100%;
    margin-top: .3rem;
    padding: .55rem .65rem;
    border: 1px solid #bbb;
    border-radius: 6px;
    font: inherit;
}

.required {
    color: var(--important);
}

.optional {
    font-weight: 400;
    opacity: .7;
}

.contact-note {
    margin: .75rem 0 1rem;
    padding: .6rem .75rem;
    background: #fff7d6;
    border: 1px solid #e4c85b;
    border-radius: 6px;
    font-size: .95rem;
}

.contact-note.ready {
    display: none;
}

.photo-instructions {
    margin-top: 1.25rem;
}

.photo-example-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}

.photo-example {
    margin: 0;
    text-align: center;

}

.example-image {
    width: 175px;
    height: 175px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 2px solid #ccc;
    background: #f5f5f5;
    font-weight: 700;
}

.photo-example.bad .example-image {
    /*border-color: #b00000;*/
    /*color: #b00000;*/
    border-color: #000000;
}

.photo-example.good .example-image {
    /*border-color: #197a2e;*/
    /*color: #197a2e;*/
    border-color: #000000;
}

.photo-example figcaption {
    margin-top: .35rem;
    font-size: .9rem;
}

.match-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
    margin-top: 1.25rem;
}

.match-action-btn {
    padding: .8rem;
    border: 1px solid #8a6a43;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
}

.match-action-btn span {
    display: block;
    margin-top: .25rem;
    font-size: .8rem;
    font-weight: 400;
    opacity: .75;
}

.match-action-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.best-results{
    font-size: .8rem;
    font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;
    margin-top: 1rem;
}

.best-results-li{
    font-size: .8rem;
    font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;

}

@media (max-width: 700px) {
    .contact-grid,
    .photo-example-grid,
    .match-actions {
        grid-template-columns: 1fr;
    }
    .photo-instructions h3{
        font-size: 1.3rem;
    }
}




@media (min-width: 640px) {
    .field-grid.two {
        grid-template-columns: 1fr 1fr;
    }

    .chip-group {
        grid-template-columns: repeat(2, 1fr);
    }
}