/**
 * Modern Floating Contact Panel Styles
 * Inspired by Material Design with glassmorphism and smooth animations
 */

/* ════════════════════════════════════════════════════════════
   Base Panel Container
════════════════════════════════════════════════════════════ */
.fcp-floating-panel {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fcp-floating-panel[data-position="left"] {
    left: 0;
}

.fcp-floating-panel[data-position="right"] {
    right: 0;
}

/* ════════════════════════════════════════════════════════════
   Toggle Button (Arrow/Chevron) - Smaller Size
════════════════════════════════════════════════════════════ */
.fcp-toggle-btn {
    position: absolute;
    top: -45px;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    z-index: 10;
}

.fcp-floating-panel[data-position="left"] .fcp-toggle-btn {
    left: 12px;
}

.fcp-floating-panel[data-position="right"] .fcp-toggle-btn {
    right: 12px;
}

.fcp-toggle-btn i {
    color: #ffffff;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.fcp-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.fcp-toggle-btn:active {
    transform: scale(0.95);
}

/* ════════════════════════════════════════════════════════════
   Icons Container (Collapsed State) - Smaller & Compact
════════════════════════════════════════════════════════════ */
.fcp-icons-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 100px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.fcp-floating-panel[data-position="left"] .fcp-icons-container {
    margin-left: 0;
}

.fcp-floating-panel[data-position="right"] .fcp-icons-container {
    margin-right: 0;
}

.fcp-floating-panel.fcp-expanded .fcp-icons-container {
    transform: translateX(0);
}

/* Dark theme */
.fcp-floating-panel[data-theme="dark"] .fcp-icons-container {
    background: rgba(26, 32, 44, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ════════════════════════════════════════════════════════════
   Individual Icon Wrapper - Smooth hover effect
════════════════════════════════════════════════════════════ */
.fcp-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

/* ════════════════════════════════════════════════════════════
   Icon Buttons (Collapsed State) - Smaller Size
════════════════════════════════════════════════════════════ */
.fcp-icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.fcp-icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fcp-icon-btn:hover::before {
    opacity: 1;
}

.fcp-icon-btn i {
    color: #ffffff;
    font-size: 1.25rem;
    z-index: 1;
    transition: transform 0.3s ease;
}

.fcp-icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.fcp-icon-btn:hover i {
    transform: scale(1.1);
}

.fcp-icon-btn:active {
    transform: scale(0.95);
}

/* Active state */
.fcp-icon-wrapper.fcp-active .fcp-icon-btn {
    transform: scale(1.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* ════════════════════════════════════════════════════════════
   Hover Card (Shows on Icon Hover) - Smaller & Compact
════════════════════════════════════════════════════════════ */
.fcp-hover-card {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: #ffffff;
    border-radius: 14px;
    padding: 12px 16px;
    min-width: 240px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12),
                0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 100;
}

.fcp-floating-panel[data-position="left"] .fcp-hover-card {
    left: calc(100% + 16px);
}

.fcp-floating-panel[data-position="right"] .fcp-hover-card {
    right: calc(100% + 16px);
    transform: translateY(-50%) translateX(-10px);
}

.fcp-icon-wrapper:hover .fcp-hover-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.fcp-floating-panel[data-position="right"] .fcp-icon-wrapper:hover .fcp-hover-card {
    transform: translateY(-50%) translateX(0);
}

/* Hover card components - Smaller */
.fcp-hover-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.fcp-hover-card:hover .fcp-hover-card-icon {
    transform: scale(1.05);
}

.fcp-hover-card-icon i {
    color: #ffffff;
    font-size: 1.2rem;
}

.fcp-hover-card-content {
    flex: 1;
}

.fcp-hover-card-content h4 {
    margin: 0 0 3px 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a202c;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}

.fcp-hover-card-content p {
    margin: 0 0 2px 0;
    font-size: 0.75rem;
    color: #4a5568;
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    line-height: 1.4;
}

.fcp-hover-card-content small {
    display: block;
    font-size: 0.7rem;
    color: #22c55e;
    font-weight: 600;
    margin-top: 3px;
}

.fcp-hover-card-arrow {
    color: #cbd5e0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.fcp-hover-card:hover .fcp-hover-card-arrow {
    color: #667eea;
    transform: translateX(4px);
}

/* Dark theme for hover card */
.fcp-floating-panel[data-theme="dark"] .fcp-hover-card {
    background: #2d3748;
    border-color: rgba(255, 255, 255, 0.1);
}

.fcp-floating-panel[data-theme="dark"] .fcp-hover-card-content h4 {
    color: #f7fafc;
}

.fcp-floating-panel[data-theme="dark"] .fcp-hover-card-content p {
    color: #cbd5e0;
}

/* ════════════════════════════════════════════════════════════
   Active Card (Expanded State When Clicked)
════════════════════════════════════════════════════════════ */
.fcp-active-card {
    position: absolute;
    top: 0;
    transform: translateX(10px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.fcp-floating-panel[data-position="left"] .fcp-active-card {
    left: calc(100% + 16px);
}

.fcp-floating-panel[data-position="right"] .fcp-active-card {
    right: calc(100% + 16px);
    transform: translateX(-10px);
}

.fcp-active-card.fcp-visible {
    opacity: 1;
    transform: translateX(0);
}

.fcp-active-card-inner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 24px;
    min-width: 320px;
    box-shadow: 0 16px 56px rgba(102, 126, 234, 0.3),
                0 6px 24px rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.fcp-active-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.fcp-active-card-icon i {
    color: #ffffff;
    font-size: 1.8rem;
}

.fcp-active-card-content {
    flex: 1;
    color: #ffffff;
}

.fcp-active-card-content h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}

.fcp-active-card-content p {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    line-height: 1.5;
}

.fcp-active-card-content small {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    margin-top: 4px;
}

/* ════════════════════════════════════════════════════════════
   Animations & Effects
════════════════════════════════════════════════════════════ */
@keyframes fcpPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
    }
}

.fcp-icon-btn:focus {
    outline: none;
    animation: fcpPulse 1.5s infinite;
}

/* ════════════════════════════════════════════════════════════
   Responsive Design - Adjusted for Smaller Size
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .fcp-floating-panel {
        transform: translateY(-50%) scale(0.88);
    }
    
    .fcp-icon-btn {
        width: 42px;
        height: 42px;
    }
    
    .fcp-icon-btn i {
        font-size: 1.1rem;
    }
    
    .fcp-hover-card,
    .fcp-active-card-inner {
        min-width: 220px;
    }
    
    .fcp-toggle-btn {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .fcp-floating-panel {
        transform: translateY(-50%) scale(0.8);
    }
    
    .fcp-hover-card,
    .fcp-active-card-inner {
        min-width: 200px;
        padding: 10px 14px;
    }
    
    .fcp-hover-card-content h4,
    .fcp-active-card-content h4 {
        font-size: 0.8rem;
    }
    
    .fcp-hover-card-content p,
    .fcp-active-card-content p {
        font-size: 0.72rem;
    }
}

/* ════════════════════════════════════════════════════════════
   Print Styles
════════════════════════════════════════════════════════════ */
@media print {
    .fcp-floating-panel {
        display: none !important;
    }
}

/* ════════════════════════════════════════════════════════════
   Accessibility
════════════════════════════════════════════════════════════ */
.fcp-icon-btn:focus-visible,
.fcp-toggle-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fcp-floating-panel,
    .fcp-toggle-btn,
    .fcp-icon-btn,
    .fcp-hover-card,
    .fcp-active-card {
        transition: none;
        animation: none;
    }
}
