/* ============================================================
   Royal Block Search — styles
   ============================================================ */

/* ── CSS Variables ───────────────────────────────────────── */
.rbs-root {
    --rbs-focus-color: #6366f1;
    --rbs-transition: 0.2s ease;
    width: 100%;
    display: block;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.rbs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* ── Input ───────────────────────────────────────────────── */
.rbs-input {
    width: 100%;
    padding: 14px 48px 14px 52px;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 100px;
    font-size: 15px;
    color: #374151;
    outline: none;
    transition: border-color var(--rbs-transition), box-shadow var(--rbs-transition);
    box-sizing: border-box;
    line-height: 1.4;
    font-family: inherit;
}

.rbs-input::placeholder {
    color: #9ca3af;
}

.rbs-input:focus {
    /* border-color: var(--rbs-focus-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rbs-focus-color) 15%, transparent); */
}

/* When icon is on the right — flip padding */
.rbs-icon-pos-right .rbs-input {
    padding-left: 20px;
    padding-right: 52px;
}

/* When no icon */
.rbs-wrapper:not(.rbs-has-icon) .rbs-input {
    padding-left: 20px;
}

/* ── Icon ────────────────────────────────────────────────── */
.rbs-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
    transition: color var(--rbs-transition);
    width: 20px;
    height: 20px;
}

.rbs-icon svg,
.rbs-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.rbs-icon i {
    font-size: 18px;
    line-height: 1;
}

.rbs-icon-left {
    left: 18px;
}

.rbs-icon-right {
    right: 18px;
}

/* Icon color on focus */
.rbs-wrapper:focus-within .rbs-icon {
    color: var(--rbs-focus-color);
}

/* ── Clear button ────────────────────────────────────────── */
.rbs-clear-btn {
    position: absolute;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    transition: background var(--rbs-transition), color var(--rbs-transition), transform 0.15s ease;
    z-index: 2;
    flex-shrink: 0;
}

.rbs-clear-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.rbs-clear-btn:active {
    transform: scale(0.9);
}

/* When icon is on the right — push clear button further left */
.rbs-icon-pos-right .rbs-clear-btn {
    right: 48px;
}

/* ── Clear button visible state ──────────────────────────── */
.rbs-wrapper.rbs-has-query .rbs-clear-btn {
    display: flex !important;
    animation: rbs-fade-in 0.15s ease forwards;
}

@keyframes rbs-fade-in {
    from {
        opacity: 0;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── No results message ──────────────────────────────────── */
.rbs-no-results-msg {
    display: none;
    padding: 24px 16px;
    text-align: center;
    font-size: 15px;
    color: #9ca3af;
    width: 100%;
}

.rbs-no-results-msg.is-visible {
    display: block;
}

/* ── Hidden items ────────────────────────────────────────── */
.rbs-item-hidden {
    display: none !important;
}