.xfrota-search-dialog:not([open]) {
    display: none;
}

.xfrota-search-dialog {
    position: fixed;
    inset: 112px 0 auto;
    width: min(640px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100dvh - 144px);
    margin: 0 auto;
    padding: 0;
    overflow: auto;
    border: 1px solid #dbe5ef;
    border-radius: 6px;
    background: #fff;
    color: #0a2148;
    box-shadow: 0 22px 60px rgba(0, 15, 39, .26);
}

.xfrota-search-dialog::backdrop {
    background: rgba(2, 16, 38, .66);
}

.xfrota-search-dialog-content {
    padding: 24px;
}

.xfrota-search-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.xfrota-search-dialog-header h2 {
    margin: 0;
    color: #0a2148;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.xfrota-search-dialog-close {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #35516f;
    cursor: pointer;
}

.xfrota-search-dialog-close:hover,
.xfrota-search-dialog-close:focus-visible {
    background: #edf4fc;
    color: #0767dc;
}

.xfrota-search-dialog-row {
    display: flex;
    gap: 10px;
}

.xfrota-search-dialog-row input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #b8c9dd;
    border-radius: 4px;
    background: #fff;
    color: #0a2148;
    font-size: 16px;
    box-shadow: none;
}

.xfrota-search-dialog-row input[type="search"]:focus {
    border-color: #1374ea;
    outline: 2px solid rgba(19, 116, 234, .18);
    outline-offset: 0;
}

.xfrota-search-dialog-row button[type="submit"] {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 112px;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #116df0;
    border-radius: 4px;
    background: #116df0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.xfrota-search-dialog-row button[type="submit"]:hover,
.xfrota-search-dialog-row button[type="submit"]:focus-visible {
    border-color: #0756bd;
    background: #0756bd;
    color: #fff;
}

@media (max-width: 600px) {
    .xfrota-search-dialog {
        top: max(80px, calc(env(safe-area-inset-top) + 64px));
        width: calc(100% - 28px);
        max-height: calc(100dvh - 112px);
    }

    .xfrota-search-dialog-content {
        padding: 18px;
    }

    .xfrota-search-dialog-header h2 {
        font-size: 18px;
    }

    .xfrota-search-dialog-row {
        flex-direction: column;
    }

    .xfrota-search-dialog-row button[type="submit"] {
        width: 100%;
    }
}
