﻿/* ═══════════════════════════════════════════
   FAB PRESTADOR — lengüeta lateral derecha
   Archivo: recursos/css/generales/fab-prestador.css
═══════════════════════════════════════════ */

/* ── Botón FAB ───────────────────────────────────────────────────── */
.fab-btn {
    position: fixed;
    top: 80px;
    right: 0;
    bottom: auto;
    width: 42px;
    height: 42px;
    border-radius: 10px 0 0 10px;
    background: #8B1D1D;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: -3px 3px 14px rgba(139,29,29,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.22s ease;
    outline: none;
    padding: 0;
}

    .fab-btn:hover {
        width: 48px;
        box-shadow: -4px 4px 18px rgba(139,29,29,0.45);
    }

    .fab-btn.fab-btn-abierto {
        background: #5c1212;
    }

/* Íconos */
.fab-icono-principal,
.fab-icono-cerrar {
    position: absolute;
    font-size: 1rem;
    transition: all 0.22s ease;
}

.fab-icono-cerrar {
    opacity: 0;
    transform: rotate(-90deg) scale(0.4);
}

.fab-btn-abierto .fab-icono-principal {
    opacity: 0;
    transform: rotate(90deg) scale(0.4);
}

.fab-btn-abierto .fab-icono-cerrar {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Badge dorado */
.fab-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    background: #D4AF37;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #fff;
    transition: all 0.2s;
}

.fab-btn-abierto .fab-badge {
    opacity: 0;
    transform: scale(0);
}

/* ── Overlay ─────────────────────────────────────────────────────── */
.fab-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.2);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    backdrop-filter: blur(1px);
}

.fab-overlay-visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Panel ───────────────────────────────────────────────────────── */
.fab-panel {
    position: fixed;
    top: 80px;
    right: 46px;
    bottom: auto;
    width: 290px;
    background: #fff;
    border: 1px solid rgba(139,29,29,0.1);
    border-radius: 14px 0 0 14px;
    box-shadow: -8px 8px 32px rgba(15,23,42,0.14), -2px 2px 8px rgba(139,29,29,0.06);
    z-index: 999;
    overflow: hidden;
    /* CERRADO por defecto */
    opacity: 0;
    transform: translateX(12px) scale(0.97);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
    transform-origin: top right;
}

/* ABIERTO */
.fab-panel-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: all;
}

/* Header */
.fab-panel-header {
    padding: 1rem 1.25rem 0.8rem;
    border-bottom: 1px solid rgba(139,29,29,0.07);
    background: rgba(139,29,29,0.03);
}

.fab-panel-titulo {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1a0a0a;
    margin-bottom: 0.12rem;
}

.fab-panel-sub {
    font-size: 0.68rem;
    color: #7a6060;
    font-weight: 600;
}

/* Items */
.fab-panel-items {
    display: flex;
    flex-direction: column;
}

.fab-panel-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1.25rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(139,29,29,0.05);
    transition: background 0.15s;
}

    .fab-panel-item:last-child {
        border-bottom: none;
    }

    .fab-panel-item:hover {
        background: rgba(139,29,29,0.03);
    }

.fab-item-icono {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.fab-item-texto {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.04rem;
}

    .fab-item-texto strong {
        font-size: 0.78rem;
        font-weight: 800;
        color: #1a0a0a;
        display: block;
    }

    .fab-item-texto span {
        font-size: 0.66rem;
        color: #7a6060;
        font-weight: 500;
        display: block;
    }

.fab-item-arrow {
    font-size: 0.58rem;
    color: rgba(139,29,29,0.25);
    flex-shrink: 0;
}

/* CTA */
.fab-panel-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.85rem;
    padding: 0.7rem;
    background: #8B1D1D;
    color: #fff;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 3px 12px rgba(139,29,29,0.28);
}

    .fab-panel-cta:hover {
        background: #6d1717;
        color: #fff;
        transform: translateY(-1px);
    }

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .fab-btn {
        top: 64px;
    }

    .fab-panel {
        top: 64px;
        right: 46px;
        width: calc(100vw - 58px);
        border-radius: 14px 0 0 14px;
    }
}
