.msg-app,
.msg-app * {
    box-sizing: border-box;
}
.msg-app {
    --msg-orange: #f9580a;
    --msg-orange-dark: #d94300;
    --msg-ink: #172033;
    --msg-muted: #667085;
    --msg-line: #e5e7eb;
    width: 100%;
    max-width: 980px;
    margin: 24px auto;
    padding: 28px;
    border: 1px solid #edf0f4;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 50px rgba(16, 24, 40, .08);
    color: var(--msg-ink);
    font-family: inherit;
    text-align: right;
}
.msg-app-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--msg-line);
}
.msg-icon-wrap {
    display: flex;
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #fff1e9;
}
.msg-icon-wrap svg {
    width: 34px;
    height: 34px;
    fill: var(--msg-orange);
}
.msg-app-header h2 {
    margin: 0 0 5px;
    color: var(--msg-ink);
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.5;
}
.msg-app-header p {
    margin: 0;
    color: var(--msg-muted);
    font-size: 14px;
    line-height: 1.9;
}
.msg-alert {
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 2;
}
.msg-alert-info {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #7c2d12;
}
.msg-search-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 22px;
    border-radius: 18px;
    background: #f8fafc;
}
.msg-field label {
    display: block;
    margin: 0 0 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
}
.msg-field label span {
    color: #d92d20;
}
.msg-field label small {
    color: var(--msg-muted);
    font-weight: 400;
}
.msg-field input,
.msg-field select {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
    color: #101828;
    font: inherit;
    font-size: 15px;
    outline: 0;
    transition: border-color .2s, box-shadow .2s;
}
.msg-field input:focus,
.msg-field select:focus {
    border-color: var(--msg-orange);
    box-shadow: 0 0 0 4px rgba(249, 88, 10, .12);
}
.msg-field select:disabled {
    background: #f2f4f7;
    color: #98a2b3;
    cursor: not-allowed;
}
.msg-field-brand {
    grid-column: 1 / -1;
}
.msg-form-action {
    display: flex;
    grid-column: 1 / -1;
    align-items: end;
}
.msg-search-button,
.msg-warranty-button,
.msg-footer-link a {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    border: 0;
    border-radius: 12px;
    background: var(--msg-orange);
    color: #fff !important;
    font: inherit;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .15s, background .2s, box-shadow .2s;
}
.msg-search-button {
    width: 100%;
}
.msg-search-button:hover,
.msg-warranty-button:hover,
.msg-footer-link a:hover {
    background: var(--msg-orange-dark);
    box-shadow: 0 8px 20px rgba(249, 88, 10, .24);
    transform: translateY(-1px);
}
.msg-search-button:disabled {
    opacity: .75;
    cursor: wait;
}
.msg-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: msg-spin .7s linear infinite;
}
.msg-search-button.is-loading .msg-spinner {
    display: inline-block;
}
@keyframes msg-spin { to { transform: rotate(360deg); } }
.msg-feedback {
    display: none;
    margin: 18px 0 0;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 14px;
}
.msg-feedback.is-visible {
    display: block;
}
.msg-feedback.is-info {
    border: 1px solid #b9dcff;
    background: #eff8ff;
    color: #175cd3;
}
.msg-feedback.is-error {
    border: 1px solid #fecdca;
    background: #fef3f2;
    color: #b42318;
}
.msg-results {
    margin-top: 24px;
    scroll-margin-top: 24px;
}
.msg-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 14px;
}
.msg-result-heading h3 {
    margin: 0;
    font-size: 20px;
}
.msg-result-heading span {
    padding: 5px 10px;
    border-radius: 20px;
    background: #f2f4f7;
    color: #475467;
    font-size: 12px;
}
.msg-guide-card {
    margin: 0 0 20px;
    padding: 22px;
    border: 1px solid var(--msg-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
}
.msg-guide-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: start;
}
.msg-guide-top h4 {
    margin: 0 0 8px;
    color: var(--msg-ink);
    font-size: 19px;
    line-height: 1.7;
}
.msg-general-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 20px;
    background: #ecfdf3;
    color: #027a48;
    font-size: 12px;
}
.msg-guide-top dl {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}
.msg-guide-top dl div {
    min-width: 105px;
    padding: 8px 11px;
    border-radius: 10px;
    background: #f8fafc;
}
.msg-guide-top dt {
    color: var(--msg-muted);
    font-size: 11px;
}
.msg-guide-top dd {
    margin: 2px 0 0;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}
.msg-location {
    margin: 16px 0;
    padding: 12px 14px;
    border-right: 4px solid var(--msg-orange);
    border-radius: 9px;
    background: #fff8f3;
    color: #7c2d12;
    line-height: 1.9;
}
.msg-summary,
.msg-content {
    color: #475467;
    font-size: 14px;
    line-height: 2;
}
.msg-summary p:first-child,
.msg-content p:first-child { margin-top: 0; }
.msg-summary p:last-child,
.msg-content p:last-child { margin-bottom: 0; }
.msg-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.msg-image-button {
    position: relative;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--msg-line);
    border-radius: 14px;
    background: #f8fafc;
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
}
.msg-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    transition: transform .25s;
}
.msg-image-button:hover img {
    transform: scale(1.03);
}
.msg-image-button span {
    position: absolute;
    right: 8px;
    left: 8px;
    bottom: 8px;
    padding: 6px 8px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(17, 24, 39, .78);
    color: #fff;
    font-size: 11px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.msg-image-button i {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #101828;
    font-size: 21px;
    font-style: normal;
    line-height: 30px;
}
.msg-no-image,
.msg-empty-state {
    padding: 28px;
    border: 1px dashed #d0d5dd;
    border-radius: 14px;
    background: #f9fafb;
    color: var(--msg-muted);
    text-align: center;
}
.msg-empty-state {
    margin-top: 22px;
}
.msg-empty-state strong {
    display: block;
    margin-bottom: 5px;
    color: #344054;
    font-size: 18px;
}
.msg-empty-state p {
    margin: 0;
}
.msg-warranty-button {
    margin-top: 18px;
}
.msg-footer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 18px;
    border-radius: 16px;
    background: #172033;
    color: #fff;
}
.msg-footer-link a {
    min-height: 44px;
    padding: 8px 16px;
}
.msg-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
    background: rgba(0, 0, 0, .86);
}
.msg-lightbox.is-open {
    display: flex;
}
.msg-lightbox img {
    display: block;
    max-width: min(1100px, 94vw);
    max-height: 82vh;
    border-radius: 12px;
    background: #fff;
    object-fit: contain;
}
.msg-lightbox p {
    margin: 12px 0 0;
    color: #fff;
    text-align: center;
}
.msg-lightbox-close {
    position: absolute;
    top: 18px;
    left: 22px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 28px;
    line-height: 40px;
    cursor: pointer;
}
body.msg-lightbox-open {
    overflow: hidden;
}
@media (max-width: 760px) {
    .msg-app {
        margin: 12px auto;
        padding: 18px;
        border-radius: 18px;
    }
    .msg-app-header {
        align-items: flex-start;
    }
    .msg-icon-wrap {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }
    .msg-icon-wrap svg {
        width: 28px;
        height: 28px;
    }
    .msg-search-form {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .msg-field-brand,
    .msg-form-action {
        grid-column: auto;
    }
    .msg-guide-top {
        grid-template-columns: 1fr;
    }
    .msg-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .msg-footer-link {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
@media (max-width: 450px) {
    .msg-app-header {
        display: block;
        text-align: center;
    }
    .msg-icon-wrap {
        margin: 0 auto 12px;
    }
    .msg-image-grid {
        grid-template-columns: 1fr;
    }
    .msg-result-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .msg-guide-card {
        padding: 16px;
    }
}
