/**
 * rkr_bloqueexperto
 */

:root {
    --rkr-be-principal: var(--color-principal, #1E3A4F);
    --rkr-be-acento: var(--color-acento, #E53935);
    --rkr-be-hover: var(--color-hover, #152938);
    --rkr-be-whatsapp: var(--color-whatsapp, #25D366);
    --rkr-be-online: var(--color-online, #4CAF50);
    --rkr-be-offline: var(--color-offline, #9E9E9E);
    --rkr-be-bg: #ffffff;
    --rkr-be-text: #333333;
    --rkr-be-border: #e0e0e0;
}

/* Bloque Moderno */
.rkr-be-bloque-modern {
    display: flex;
    width: 100%;
    align-items: center;
    position: relative;
    background-color: var(--rkr-be-bg);
    border: 1px solid var(--rkr-be-border);
    border-radius: 8px;
    padding: 10px 16px 10px 10px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    font-family: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.rkr-be-bloque-modern:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-color: var(--rkr-be-principal);
}

.rkr-be-hover-active.rkr-be-bloque-modern {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s, border-color 0.2s;
}
.rkr-be-hover-active.rkr-be-bloque-modern:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.rkr-be-avatar-wrap {
    position: relative;
    margin-right: 12px;
}

.rkr-be-avatar-square {
    width: 48px;
    height: 38px;
    border-radius: 4px;
    object-fit: cover;
    background-color: #222;
}

.rkr-be-avatar-round {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #222;
}

.rkr-be-avatar-wrap-multiple {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.rkr-be-avatar-round, .rkr-be-avatar-square {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 3px solid var(--rkr-be-bg);
    background-color: var(--rkr-be-bg);
    box-sizing: content-box;
}
.rkr-be-avatar-round {
    border-radius: 50%;
}
.rkr-be-avatar-square {
    border-radius: 8px;
}

.rkr-be-avatar-wrap-multiple {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rkr-be-avatar-stacked {
    border-radius: 50%; /* Always round when stacked */
}

.rkr-be-avatar-logo {
    object-fit: contain;
    background-color: #ffffff;
    padding: 6px;
    box-sizing: border-box;
}

.rkr-be-avatar-more {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #666;
    font-size: 0.85rem;
    font-weight: bold;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 1;
}

.rkr-be-avatar-demo-square {
    width: 48px;
    height: 38px;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.rkr-be-avatar-demo-round {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #f0f0f0;
}

.rkr-be-status-dot-modern {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background-color: var(--rkr-be-online, #4CAF50);
    border: 2px solid var(--rkr-be-bg, #ffffff);
    border-radius: 50%;
    z-index: 20;
}

.rkr-be-status-dot-modern::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--rkr-be-online, #4CAF50);
    box-sizing: content-box;
    display: none;
}

.rkr-be-pulse-active .rkr-be-status-dot-modern::after {
    display: block;
    animation: rkr-be-pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes rkr-be-pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

.rkr-be-status-dot-modern--offline {
    background-color: var(--rkr-be-offline);
}

.rkr-be-status-dot-modern--offline::after {
    display: none; /* No pulse when offline */
}

/* Tooltip */
.rkr-be-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    top: auto;
    left: 15px;
    right: auto;
    background-color: #fff;
    color: #333;
    padding: 12px 28px 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 50;
    pointer-events: none;
    width: max-content;
    max-width: 280px;
    border: 1px solid #eee;
}

.rkr-be-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    top: auto;
    left: 20px;
    right: auto;
    transform: none;
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.rkr-be-tooltip.rkr-be-tooltip-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.rkr-be-tooltip-close {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 18px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.rkr-be-tooltip-close:hover {
    color: #333;
}

.rkr-be-text-container-modern {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.rkr-be-cta-modern {
    font-size: 0.9rem;
    color: var(--rkr-be-text);
}

.rkr-be-link-modern {
    font-size: 0.9rem;
    color: var(--rkr-be-online);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin: 0;
}

.rkr-be-link-modern:hover {
    color: var(--rkr-be-principal);
}

/* Offcanvas – CSS checkbox + JS class (dual approach for max compatibility) */
.rkr-be-toggle-checkbox {
    display: none;
}

.rkr-be-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: var(--rkr-be-z-panel, 1055);
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: 100vw;
    visibility: hidden;
    background-color: var(--rkr-be-bg);
    background-clip: padding-box;
    outline: 0;
    transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
    box-shadow: -8px 0 24px rgba(0,0,0,0.18);
    transform: translateX(100%);
    font-family: inherit;
    overflow: hidden;
    pointer-events: none;
}

/* CSS checkbox approach */
.rkr-be-toggle-checkbox:checked ~ .rkr-be-offcanvas,
/* JS class approach (fallback) */
.rkr-be-offcanvas--open {
    visibility: visible;
    transform: translateX(0);
    pointer-events: all;
}

.rkr-be-offcanvas-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--rkr-be-z-backdrop, 1050);
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    cursor: pointer;
}

/* CSS checkbox approach for backdrop (label sibling) */
.rkr-be-toggle-checkbox:checked ~ .rkr-be-offcanvas-backdrop,
/* JS class approach */
.rkr-be-offcanvas-backdrop--visible {
    display: block;
}

/* ====== NEW CLEAN SIDEBAR DESIGN ====== */

.rkr-be-offcanvas-header-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--rkr-be-principal);
    padding: 1.5rem 1rem 1.5rem 1rem;
    color: #fff;
    position: relative;
}

.rkr-be-btn-close-custom {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.2s;
    opacity: 0.85;
}

.rkr-be-btn-close-custom:hover {
    opacity: 1;
}

/* Sin outline:none: con el panel abierto por teclado, el foco empieza aqui */
.rkr-be-btn-close-custom:focus-visible,
.rkr-be-bloque-modern:focus-visible,
.rkr-be-contact:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.rkr-be-offcanvas-title-custom {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #ffffff;
    text-align: center;
    width: 100%;
}

.rkr-be-offcanvas-body-custom.rkr-clean-body {
    flex-grow: 1;
    padding: 0 1.5rem 1.5rem 1.5rem;
    overflow-y: auto;
    text-align: center;
    background-color: #f5f5f5; /* Light gray */
}

.rkr-clean-subtitle-container {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.rkr-be-contact-subtitle.rkr-clean-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.rkr-be-expert-name.rkr-clean-desc {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
}

/* AVATARS ROW */
.rkr-be-experts-list.rkr-clean-avatars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
    margin-top: 1rem;
}

.rkr-clean-avatar-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
}

.rkr-clean-avatar-wrapper img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rkr-clean-avatar-wrapper img.rkr-be-avatar-logo {
    width: auto;
    max-width: 150px;
    height: 60px;
    object-fit: contain;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}



/* BUTTONS */
.rkr-be-contact-icons.rkr-clean-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.rkr-icon-link.rkr-clean-btn-black,
.rkr-icon-link.rkr-clean-btn-white {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rkr-icon-link.rkr-clean-btn-black {
    background-color: #000;
    color: #fff;
}

.rkr-icon-link.rkr-clean-btn-white {
    background-color: #fff;
    color: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.rkr-icon-link.rkr-clean-btn-black:hover,
.rkr-icon-link.rkr-clean-btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.rkr-icon-link.rkr-clean-btn-wa {
    color: #25D366; /* WhatsApp green */
}

.rkr-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rkr-be-principal);
    transition: transform 0.2s, color 0.2s;
    text-decoration: none;
}

.rkr-icon-link svg,
.rkr-be-btn-close-custom svg {
    fill: none;
    stroke: currentColor;
}

.rkr-icon-link svg *,
.rkr-be-btn-close-custom svg * {
    fill: none;
}

.rkr-icon-link:hover {
    color: var(--rkr-be-hover);
    transform: translateY(-2px);
}

.rkr-icon-link[href^="https://wa.me"] {
    color: var(--rkr-be-whatsapp);
}

.rkr-icon-link[href^="tel:"] {
    color: var(--rkr-be-online);
}

.rkr-icon-link[href^="mailto:"] {
    color: var(--rkr-be-principal);
}

.rkr-be-schedule-compact {
    text-align: left;
    margin: 0 auto 2rem auto;
    max-width: 250px;
}

.rkr-be-schedule-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--rkr-be-text);
}

.rkr-be-schedule-closed {
    color: var(--rkr-be-acento);
}

.rkr-be-extra-html-container {
    text-align: left;
    margin: 0 0 2rem 0;
}

.rkr-be-extra-html-container p {
    margin-bottom: 0.8rem;
    color: var(--rkr-be-text);
}

.rkr-be-extra-html-container a {
    color: var(--rkr-be-principal);
    text-decoration: underline;
}

.rkr-be-extra-html-container a:hover {
    color: var(--rkr-be-hover);
}

.rkr-be-extra-html-container ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--rkr-be-text);
}

.rkr-be-extra-html-container li {
    margin-bottom: 0.5rem;
}

.rkr-be-btn-outline {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    border: 1px solid var(--rkr-be-online);
    color: var(--rkr-be-online);
    background: transparent;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rkr-be-btn-outline:hover {
    background: var(--rkr-be-online);
    color: #fff;
}

/* Responsive Texts */
.rkr-be-mobile-text {
    display: none;
}
.rkr-be-desktop-text {
    display: inline;
}

@media (max-width: 768px) {
    .rkr-be-mobile-text {
        display: inline;
    }
    .rkr-be-desktop-text {
        display: none;
    }
}

/* Stacked Avatars */
.rkr-be-avatar-wrap-multiple {
    display: flex;
    align-items: center;
    margin-right: 25px;
}

.rkr-be-avatar-stacked {
    border: 3px solid var(--rkr-be-bg);
    margin-right: -15px; /* Overlap */
    position: relative;
}

.rkr-be-avatar-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--rkr-be-principal);
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid var(--rkr-be-bg);
    z-index: 1;
    position: relative;
}

/* Hasta 2.1.0 aqui habia una regla de 48x38 para los avatares cuadrados
   apilados que nunca se aplicaba: la tapaban los !important de arriba. Al
   quitar los !important se retira para que el bloque siga viendose igual. */

/* ====== 2.2.0: clases en lugar de estilos en linea ======
   Todo lo de aqui abajo estaba escrito como style="... !important" en
   sidebar.tpl. Ahora el tema puede retocarlo con un selector normal. */

.rkr-be-tooltip-text {
    transition: opacity 0.3s ease;
}

.rkr-be-support-note {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 90%;
    margin: 1.5rem auto;
    padding: 10px 15px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background-color: #f0f9ff;
    color: #0369a1;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
}

.rkr-be-support-note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Logo de la tienda en lugar de avatares: a lo ancho, sin recortar */
.rkr-be-shop-logo {
    margin: 1.5rem auto;
    padding: 12px 16px;
    max-width: 240px;
    border-radius: 8px;
    background-color: #fff;
}

.rkr-be-shop-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 90px;
    object-fit: contain;
}

/* Contacto con el dato a la vista */
.rkr-be-contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
    text-align: left;
}

.rkr-be-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    color: var(--rkr-be-text);
    text-decoration: none;
    word-break: break-word;
    transition: box-shadow 0.2s;
}

.rkr-be-contact:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    color: var(--rkr-be-text);
}

.rkr-be-contact-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--rkr-be-principal);
    color: #fff;
}

.rkr-be-contact--whatsapp .rkr-be-contact-icon {
    background-color: var(--rkr-be-whatsapp);
}

.rkr-be-contact-icon svg {
    fill: none;
    stroke: currentColor;
}

.rkr-be-contact-text {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    line-height: 1.3;
}

.rkr-be-contact-text small {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.75;
}

/* Boton extra: sus colores llegan como variables desde la plantilla */
.rkr-be-btn-outline.rkr-be-extra-btn {
    background-color: var(--rkr-be-extra-btn, #0369a1);
    border-color: var(--rkr-be-extra-btn, #0369a1);
    color: #fff;
}

.rkr-be-btn-outline.rkr-be-extra-btn:hover {
    background-color: var(--rkr-be-extra-btn-hover, #0284c7);
    border-color: var(--rkr-be-extra-btn-hover, #0284c7);
    color: #fff;
}
