/* ============================================================
   RODES FLOATING BUTTONS – CSS
   Color principal: #9ED92D (verde)
   Los botones se apilan encima de cualquier botón flotante
   existente (z-index alto, bottom dinámico).
   ============================================================ */

:root {
    --rodes-green:     #9ED92D;
    --rodes-green-dk:  #7db81f;
    --rodes-white:     #ffffff;
    --rodes-dark:      #1a1a1a;
    --rodes-gray:      #555;
    --rodes-radius:    14px;
    --rodes-btn-size:  54px;
    /* Ajusta este valor si el botón existente tiene una posición diferente.
       Por defecto asumimos que el botón flotante existente está a 20px del
       borde derecho/inferior. Los nuestros arrancan desde bottom:90px. */
    --rodes-base-bottom: 90px;
    --rodes-right:     20px;
}

/* ---- WRAP ---- */
#rodes-fb-wrap {
    position: fixed;
    right: var(--rodes-right);
    bottom: var(--rodes-base-bottom);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 9998;
}

/* ---- BOTONES BASE ---- */
.rodes-fb-btn {
    width:  var(--rodes-btn-size);
    height: var(--rodes-btn-size);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rodes-green);
    color: var(--rodes-white);
    box-shadow: 0 4px 18px rgba(0,0,0,.22);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.rodes-fb-btn svg {
    width: 26px;
    height: 26px;
    pointer-events: none;
}

.rodes-fb-btn:hover,
.rodes-fb-btn:focus-visible {
    background: var(--rodes-green-dk);
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(0,0,0,.28);
}

.rodes-fb-btn:active {
    transform: scale(.96);
}

/* ---- OVERLAY (base, para popup de teléfono) ---- */
.rodes-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px var(--rodes-right) calc(var(--rodes-base-bottom) + var(--rodes-btn-size) * 2 + 30px) 20px;
    animation: rodes-fadein .2s ease;
}

/* Popup ayuda: centrado en pantalla */
#rodes-help-popup {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rodes-popup-overlay[hidden] {
    display: none !important;
}

@keyframes rodes-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- CAJA POPUP GENÉRICA ---- */
.rodes-popup-box {
    background: #fff;
    border-radius: var(--rodes-radius);
    box-shadow: 0 8px 40px rgba(0,0,0,.22);
    position: relative;
    animation: rodes-slidein .22s ease;
    width: 280px;
    max-width: calc(100vw - 40px);
}

@keyframes rodes-slidein {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ---- BOTÓN CERRAR ---- */
.rodes-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--rodes-gray);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color .15s;
}
.rodes-popup-close:hover { color: var(--rodes-dark); }

/* ======================================================
   POPUP TELÉFONO
   ====================================================== */
.rodes-phone-box {
    padding: 28px 24px 24px;
    text-align: center;
}

.rodes-phone-content {}

.rodes-phone-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--rodes-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.rodes-phone-icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.rodes-phone-label {
    font-size: 14px;
    color: var(--rodes-gray);
    margin: 0 0 6px;
    font-family: inherit;
}

.rodes-phone-number {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: var(--rodes-dark);
    text-decoration: none;
    letter-spacing: .5px;
    transition: color .15s;
}
.rodes-phone-number:hover { color: var(--rodes-green-dk); }

.rodes-phone-hours {
    font-size: 12px;
    color: #999;
    margin: 8px 0 0;
}

/* ======================================================
   POPUP AYUDA
   ====================================================== */
.rodes-help-box {
    width: 336px;
    max-width: calc(100vw - 40px);
    padding: 26px 24px 22px;
}

.rodes-help-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--rodes-dark);
    margin: 0 0 16px;
    padding-right: 20px;
    font-family: inherit;
}

.rodes-help-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rodes-help-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.rodes-help-dot {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 2px solid var(--rodes-gray);
    margin-top: 6px;
}

.rodes-help-block {
    flex: 1;
}

.rodes-help-label {
    font-size: 14px;
    color: var(--rodes-dark);
    margin: 0 0 8px;
    font-family: inherit;
}

.rodes-help-label.rodes-inline {
    margin: 0;
    line-height: 1.5;
    padding-top: 1px;
}

/* ---- Radios ---- */
.rodes-radio-group {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
}

.rodes-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--rodes-dark);
    cursor: pointer;
    user-select: none;
}

.rodes-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rodes-radio-custom {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ccc;
    flex-shrink: 0;
    position: relative;
    transition: border-color .15s;
}

.rodes-radio-label input[type="radio"]:checked + .rodes-radio-custom {
    border-color: var(--rodes-green);
}

.rodes-radio-label input[type="radio"]:checked + .rodes-radio-custom::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--rodes-green);
}

/* ---- Input teléfono + botón ---- */
.rodes-phone-input-wrap {
    display: flex;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .15s;
}
.rodes-phone-input-wrap:focus-within {
    border-color: var(--rodes-green);
}

#rodes-tel-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 9px 10px;
    font-size: 14px;
    color: var(--rodes-dark);
    background: #fff;
    font-family: inherit;
}

#rodes-submit-tel {
    width: 40px;
    flex-shrink: 0;
    border: none;
    background: var(--rodes-green);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    padding: 0;
}
#rodes-submit-tel svg {
    width: 20px;
    height: 20px;
}
#rodes-submit-tel:hover { background: var(--rodes-green-dk); }

/* ---- Mensaje feedback ---- */
.rodes-form-msg {
    margin-top: 8px;
    font-size: 13px;
    border-radius: 6px;
    padding: 7px 10px;
    line-height: 1.4;
}
.rodes-form-msg.success {
    background: #f0fae0;
    color: #3a6b00;
}
.rodes-form-msg.error {
    background: #fff0f0;
    color: #b00;
}

/* ---- Link ---- */
.rodes-link {
    color: var(--rodes-green-dk);
    font-weight: 600;
    text-decoration: none;
}
.rodes-link:hover { text-decoration: underline; }

/* ======================================================
   RESPONSIVE
   ====================================================== */
@media (max-width: 767px) {
    /* Popup teléfono: esquina inferior derecha igual que desktop */
    #rodes-phone-popup {
        align-items: flex-end;
        justify-content: flex-end;
    }

    /* Popup ayuda: full width pegado al fondo */
    #rodes-help-popup {
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }
    #rodes-help-popup .rodes-help-box {
        width: 100%;
        max-width: 100%;
        border-radius: var(--rodes-radius) var(--rodes-radius) 0 0;
    }
}
