/*
========================================================================================
    CSS OVERLAY RICERCA CORSI - NonSoloFitness
========================================================================================
    Richiede: css_2026_Variabili_globali.css (caricato prima di questo file)
    Prefisso classi: rcbs- (ricerca-corso-barra-superiore)
========================================================================================
*/


/* ============================================
   OVERLAY
   ============================================ */
.rcbs-overlay {
    position: fixed; inset: 0; z-index: 99999;
    display: none; flex-direction: column; align-items: center;
    background: var(--nsf-black-85);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    overflow-x: hidden; overflow-y: auto; opacity: 0; transition: opacity .25s ease; }

.rcbs-overlay.rcbs-visible {
    display: flex; }

.rcbs-overlay.rcbs-active {
    opacity: 1; }


/* ============================================
   CONTAINER
   ============================================ */
.rcbs-container {
    width: 94%; max-width: 660px; margin-top: 50px; padding: 10px;
    position: relative; transform: translateY(-16px); opacity: 0;
    transition: transform .3s cubic-bezier(.22,.9,.36,1), opacity .25s ease; background-color:#FFFFFF; padding-top:10px; }

.rcbs-overlay.rcbs-active .rcbs-container {
    transform: translateY(0); opacity: 1; }


/* ============================================
   CHIUDI
   ============================================ */
.rcbs-close {
    position: absolute; top: -44px; right: 0;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.6); font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .15s;
    padding: 0; box-shadow: none; line-height: 1; }

.rcbs-close:hover {
    background: rgba(255,255,255,.15); color: var(--nsf-white); }


/* ============================================
   INPUT
   ============================================ */
.rcbs-input-wrap {
    position: relative; background: var(--nsf-white); border-radius: 28px;
    border: 1px solid var(--nsf-gray-750); transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box; max-width: 100%; }

.rcbs-input-wrap.rcbs-has-results {
    border-radius: 28px; }

.rcbs-input-wrap:hover {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1); }

.rcbs-input-wrap:focus-within {
    border-color: var(--nsf-gray-400); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15); }

.rcbs-input-icon-logo {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px; opacity: 0.4; pointer-events: none; }

.rcbs-input-icon-search {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; fill: var(--nsf-gray-500); pointer-events: none; }

.rcbs-input {
    width: 100% !important; border: none !important; outline: none !important;
    padding: 14px 44px 14px 46px !important;
    font-size: 16px !important; font-weight: 400 !important; line-height: 1.4 !important;
    color: var(--nsf-black-soft) !important; background: transparent !important;
    border-radius: 28px !important; box-shadow: none !important; font-family: inherit !important; }

.rcbs-input:focus {
    border: none !important; outline: none !important; box-shadow: none !important; }

.rcbs-input::placeholder {
    color: var(--nsf-gray-500); font-size: 14px; opacity: 1; }

.rcbs-input::-webkit-search-cancel-button {
    -webkit-appearance: none; appearance: none; display: none; }

.rcbs-clear {
    position: absolute; right: 42px; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px;
    background: none; border: none; color: var(--nsf-gray-500);
    display: none; align-items: center; justify-content: center;
    cursor: pointer; transition: color .15s;
    padding: 0; box-shadow: none; line-height: 1; font-size: 14px; }

.rcbs-clear.rcbs-shown {
    display: flex; }

.rcbs-clear:hover {
    color: var(--nsf-red); }


/* ============================================
   RISULTATI
   ============================================ */
.rcbs-results {
    background: var(--nsf-white);
    max-height: 420px; overflow-y: auto; box-sizing: border-box; max-width: 100%;
    scrollbar-width: thin; scrollbar-color: var(--nsf-gray-400) transparent; }

.rcbs-results::-webkit-scrollbar {
    width: 5px; }

.rcbs-results::-webkit-scrollbar-track {
    background: transparent; }

.rcbs-results::-webkit-scrollbar-thumb {
    background: var(--nsf-gray-400); border-radius: 3px; }

.rcbs-results:empty {
    display: none; }

.rcbs-section {
    padding: 10px 16px 6px; font-size: 11px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; color: var(--nsf-gray-700);
    font-family: 'Poppins', sans-serif; }


/* ============================================
   SINGOLO ITEM
   ============================================ */
.rcbs-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    text-decoration: none; color: inherit;
    border-bottom: 1px solid var(--nsf-gray-200);
    transition: background .12s; cursor: pointer; }

.rcbs-item:last-child {
    border-bottom: none; }

.rcbs-item:hover, .rcbs-item.rcbs-focused {
    background: var(--nsf-gray-100); }

.rcbs-item-img {
    width: 40px; height: 40px; border-radius: 4px;
    object-fit: cover; flex-shrink: 0; background: var(--nsf-gray-200);
    align-self: flex-start; margin-top: 2px; }

.rcbs-item-info {
    flex: 1; min-width: 0; }

.rcbs-item-name {
    font: 500 14px/1.3 'Poppins', sans-serif; color: var(--nsf-gray-950);
    overflow-wrap: break-word; word-wrap: break-word; }

.rcbs-item-name mark {
    background: transparent; color: var(--nsf-red); font-weight: 600; }

.rcbs-item-actions {
    display: flex; gap: 6px; margin-top: 6px; }


/* ============================================
   PULSANTI GHOST
   ============================================ */
.rcbs-btn {
    display: inline-block; padding: 3px 10px;
    font: 500 11px/1.5 'Poppins', sans-serif; letter-spacing: .02em;
    border: 1px solid; border-radius: 3px; text-decoration: none;
    cursor: pointer; transition: background .15s, color .15s; text-align: center; }

.rcbs-btn-sede, .rcbs-btn-online {
    color: var(--nsf-gray-800); border-color: var(--nsf-gray-500); background: transparent;
    opacity: 1; }

.rcbs-btn-sede:hover, .rcbs-btn-online:hover {
    background: var(--nsf-black-soft); color: var(--nsf-white); border-color: var(--nsf-black-soft);
    opacity: 1; }


/* ============================================
   PREZZO + CFU
   ============================================ */
.rcbs-item-price {
    font: 600 15px/1 'Poppins', sans-serif; color: var(--nsf-gray-950);
    white-space: nowrap; flex-shrink: 0; text-align: right; }

.rcbs-item-price span {
    font-size: 12px; font-weight: 400; }

.rcbs-item-cfu {
    display: block; font-size: 11px; font-weight: 500;
    color: var(--nsf-gray-600); margin-bottom: 2px; }


/* ============================================
   NESSUN RISULTATO
   ============================================ */
.rcbs-empty {
    padding: 32px 16px; text-align: center; }

.rcbs-empty-title {
    font: 500 14px/1.4 'Poppins', sans-serif; color: var(--nsf-gray-800); margin-bottom: 4px; }

.rcbs-empty-text {
    font-size: 13px; color: var(--nsf-gray-600); }


/* ============================================
   FOOTER
   ============================================ */
.rcbs-footer {
    padding: 10px 16px; text-align: center; border-top: 1px solid var(--nsf-gray-200); }

.rcbs-footer a {
    font: 500 13px/1 'Poppins', sans-serif; color: var(--nsf-red); text-decoration: none;
    opacity: 1; }

.rcbs-footer a:hover {
    opacity: .7; }


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {

    .rcbs-container {
        width: 100%; max-width: 100%; margin-top: 0; padding: 10px; box-sizing: border-box; }

    .rcbs-close {
        top: 12px; right: 12px; position: fixed; }

    .rcbs-results {
        max-height: 60vh; }

    .rcbs-item {
        padding: 8px 12px; gap: 10px; }

    .rcbs-item-name {
        font-size: 13px; }

    .rcbs-item-price {
        font-size: 14px; }

    .rcbs-btn {
        font-size: 10px; padding: 2px 8px; }
}