/* css/style.css */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --dark-slate: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-premium: 0 10px 30px 0 rgba(31, 38, 135, 0.08);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    margin: 0;
}

/* Glassmorphism elements */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px 0 rgba(31, 38, 135, 0.12);
}

/* Map pulsating marker styling */
.pulsating-user-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.user-dot {
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    border: 2px solid white;
    z-index: 10;
}

.pulse-ring {
    border: 3px solid #3b82f6;
    background: transparent;
    -webkit-border-radius: 30px;
    height: 30px;
    width: 30px;
    position: absolute;
    border-radius: 50%;
    left: -5px;
    top: -5px;
    -webkit-animation: pulsate 1.8s ease-out;
    -webkit-animation-iteration-count: infinite;
    opacity: 0.0;
    z-index: 5;
}

@-webkit-keyframes pulsate {
    0% {-webkit-transform: scale(0.1, 0.1); opacity: 0.0;}
    50% {opacity: 1.0;}
    100% {-webkit-transform: scale(1.2, 1.2); opacity: 0.0;}
}

/* Modern Sliding Chat Interface */
.chat-sliding-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 450px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-smooth);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.chat-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-bubble.sent {
    background-color: #4f46e5;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-bubble.received {
    background-color: #e2e8f0;
    color: #1e293b;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-footer {
    padding: 10px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}

/* WebRTC Audio Voice Call Modal Overlay styling */
.voice-call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    color: white;
}

.call-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    width: 320px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.call-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
}

.call-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #6366f1;
    object-fit: cover;
}

.pulsing-call-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #818cf8;
    border-radius: 50%;
    top: 0;
    left: 0;
    animation: call-pulse 2s infinite ease-out;
}

@keyframes call-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.audio-waves-container {
    display: flex;
    justify-content: center;
    gap: 4px;
    height: 35px;
    margin: 20px 0;
    align-items: center;
}

.wave-bar {
    width: 4px;
    background-color: #6366f1;
    border-radius: 3px;
    height: 5px;
    animation: quiet 1.2s ease-in-out infinite alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }

@keyframes quiet {
    0% { height: 5px; }
    100% { height: 35px; }
}

.call-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn-call-action {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.btn-call-action.mute {
    background-color: rgba(255,255,255,0.15);
}
.btn-call-action.mute.muted {
    background-color: #f59e0b;
}

.btn-call-action.decline {
    background-color: #ef4444;
    animation: jitter 0.5s infinite;
}

.btn-call-action.answer {
    background-color: #10b981;
}

@keyframes jitter {
    0% { transform: rotate(0); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0); }
}

/* Custom badges */
.bg-soft-success { background-color: #dcfce7; color: #15803d; }
.bg-soft-danger { background-color: #fee2e2; color: #b91c1c; }
.bg-soft-warning { background-color: #fef3c7; color: #b45309; }
.bg-soft-info { background-color: #e0f2fe; color: #0369a1; }
.bg-soft-primary { background-color: #e0e7ff; color: #4338ca; }
.bg-soft-secondary { background-color: #f1f5f9; color: #475569; }

.badge-pill {
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.75rem;
}
