/* 
   CONDOMINIO CORMORAN - MODERN PREMIUM DESIGN SYSTEM
   Design: Modern Clean / Glassmorphism / Vibrant Accents
*/

:root {
    /* Color Palette */
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --accent: #10b981;
    --bg-body: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-soft: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 90%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 90%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 90%, 1) 0, transparent 50%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.outfit-font {
    font-family: 'Outfit', sans-serif;
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation - Modern & Minimal */
.nav-pills {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.nav-link {
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    background: var(--bg-card);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: white;
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

/* Cards - Premium Glassmorphism */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    box-shadow: var(--shadow-premium);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

/* Specific Sections Styles */
.hero-section {
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

/* Chat UI Improvements */
#chat-container {
    overflow-y: auto;
    padding: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
}

.message-bubble {
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    max-width: 85%;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    background: var(--primary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 0.25rem;
}

.bot-message {
    background: white;
    border: 1px solid var(--glass-border);
    margin-right: auto;
    border-bottom-left-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Quick Prompt Chips */
.quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4f46e5;
    background-color: #eef2ff;
    border: 1px solid #e0e7ff;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: left;
}

.quick-chip:hover {
    background-color: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px -2px rgba(79, 70, 229, 0.3);
}

/* Typing Dots Animation */
.typing-dot {
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.3;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Grid for Services/Phones */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 640px) {
    .app-container {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .nav-pills {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 20px;
    border: 2px solid var(--bg-body);
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Markdown Rendering Styles */
.prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
    font-size: 0.8rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.prose th {
    background: #f1f5f9;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 700;
    color: var(--primary-dark);
    border-bottom: 2px solid #e2e8f0;
}

.prose td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.prose tr:last-child td {
    border-bottom: none;
}

.prose ul,
.prose ol {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.prose li {
    margin-bottom: 0.25rem;
}

.prose h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--primary);
}

/* =========================================================
   CIRCUNFERENCIAS FLOTANTES (FAB) CON ETIQUETA DESPLEGABLE
   ========================================================= */
.floating-actions-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 45;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 0.65rem;
    pointer-events: none;
}

.fab-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    position: relative;
    pointer-events: auto;
}

.fab-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
}

.fab-btn:hover,
.fab-btn:focus-visible,
.fab-btn:active {
    transform: scale(1.1);
    box-shadow: 0 14px 20px -3px rgba(0, 0, 0, 0.25);
    outline: none;
}

/* Colores de las circunferencias */
.fab-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.fab-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}
.fab-slate {
    background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
}
.fab-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Etiqueta flotante desplegable */
.fab-label {
    position: absolute;
    right: calc(100% + 0.6rem);
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 0.725rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Al pasar el mouse, hacer focus o seleccionar/tocar */
.fab-item:hover .fab-label,
.fab-item:focus-within .fab-label,
.fab-btn:focus .fab-label,
.fab-item.active .fab-label {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

@media (max-width: 640px) {
    .floating-actions-container {
        bottom: 5rem;
        right: 0.85rem;
        gap: 0.5rem;
    }
    .fab-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.9rem;
    }
}