/**
 * Santuario Studio UI
 * Componentes reutilizables para Santuario Café.
 */

/* Fila horizontal de notas sensoriales. */
.santuario-notes {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    width: 100%;
    overflow: visible;
}

/* Cada widget de imagen recibe esta clase y el atributo data-note. */
.santuario-note {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    min-width: 28px;
    height: 28px;
    overflow: visible;
    cursor: help;
    line-height: 1;
    transition: transform 180ms ease;
}

.santuario-note img,
.santuario-note .elementor-widget-container,
.santuario-note .elementor-widget-container img {
    display: block;
    width: 28px !important;
    height: 28px !important;
    max-width: none !important;
    object-fit: contain;
}

.santuario-note:hover,
.santuario-note:focus,
.santuario-note:focus-within {
    transform: translateY(-2px);
    outline: none;
}

.santuario-note::after {
    content: attr(data-note);
    position: absolute;
    z-index: 9999;
    left: 50%;
    bottom: calc(100% + 11px);
    transform: translateX(-50%) translateY(6px);
    min-width: max-content;
    padding: 6px 10px;
    border: 1px solid rgba(74, 52, 40, 0.18);
    border-radius: 6px;
    background: #f8f5ef;
    color: #4a3428;
    box-shadow: 0 8px 24px rgba(43, 36, 29, 0.10);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.santuario-note::before {
    content: "";
    position: absolute;
    z-index: 10000;
    left: 50%;
    bottom: calc(100% + 7px);
    width: 8px;
    height: 8px;
    border-right: 1px solid rgba(74, 52, 40, 0.18);
    border-bottom: 1px solid rgba(74, 52, 40, 0.18);
    background: #f8f5ef;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) rotate(45deg);
    transition: opacity 180ms ease, visibility 180ms ease;
}

.santuario-note:hover::after,
.santuario-note:focus::after,
.santuario-note:focus-within::after,
.santuario-note:hover::before,
.santuario-note:focus::before,
.santuario-note:focus-within::before {
    opacity: 1;
    visibility: visible;
}

.santuario-note:hover::after,
.santuario-note:focus::after,
.santuario-note:focus-within::after {
    transform: translateX(-50%) translateY(0);
}

/* Evita mostrar cajas vacías si falta el texto de la nota. */
.santuario-note:not([data-note])::before,
.santuario-note:not([data-note])::after,
.santuario-note[data-note=""]::before,
.santuario-note[data-note=""]::after {
    display: none;
}

@media (hover: none) {
    .santuario-note {
        cursor: default;
    }
}

@media (prefers-reduced-motion: reduce) {
    .santuario-note,
    .santuario-note::before,
    .santuario-note::after {
        transition: none;
    }
}
