/**
 * GengSego Contact Admin - Frontend Styles
 * 
 * @package GengSegoContactAdmin
 * @since 1.0.0
 */

/* Floating Contact Box */
.ggsca-floating-contact {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ggsca-floating-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    animation: ggsca-bounce 2s infinite;
}

.ggsca-floating-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.ggsca-toggle-icon {
    font-size: 1.5rem;
    color: white;
}

.ggsca-floating-content {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.ggsca-floating-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ggsca-floating-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ggsca-floating-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.ggsca-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.ggsca-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ggsca-floating-profiles {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.ggsca-floating-profile {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.ggsca-floating-profile:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.ggsca-floating-profile:last-child {
    margin-bottom: 0;
}

.ggsca-floating-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid #e9ecef;
}

.ggsca-floating-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ggsca-floating-photo.ggsca-no-photo {
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: #6c757d;
}

.ggsca-floating-info {
    flex: 1;
}

.ggsca-floating-name {
    margin: 0 0 2px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
}

.ggsca-floating-job {
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
}

.ggsca-floating-buttons {
    display: flex;
    gap: 6px;
}

.ggsca-floating-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.ggsca-floating-btn svg {
    width: 16px;
    height: 16px;
}

.ggsca-floating-btn.ggsca-whatsapp {
    background: #25D366;
    color: white;
}

.ggsca-floating-btn.ggsca-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.1);
}

.ggsca-floating-btn.ggsca-telegram {
    background: #0088cc;
    color: white;
}

.ggsca-floating-btn.ggsca-telegram:hover {
    background: #006699;
    transform: scale(1.1);
}

/* Animation */
@keyframes ggsca-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ggsca-floating-contact {
        bottom: 15px;
        right: 15px;
    }
    
    .ggsca-floating-toggle {
        width: 50px;
        height: 50px;
    }
    
    .ggsca-toggle-icon {
        font-size: 1.2rem;
    }
    
    .ggsca-floating-content {
        width: 280px;
        bottom: 70px;
    }
    
    .ggsca-floating-profiles {
        padding: 16px;
    }
    
    .ggsca-floating-profile {
        padding: 10px;
    }
    
    .ggsca-floating-photo {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .ggsca-floating-name {
        font-size: 0.85rem;
    }
    
    .ggsca-floating-job {
        font-size: 0.75rem;
    }
    
    .ggsca-floating-btn {
        width: 28px;
        height: 28px;
    }
    
    .ggsca-floating-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .ggsca-floating-content {
        width: calc(100vw - 30px);
        right: -15px;
    }
    
    .ggsca-floating-profiles {
        max-height: 300px;
    }
}

/* Contact Box General Styles */
.ggsca-contact-box {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.ggsca-contact-box * {
    box-sizing: border-box;
}

/* Accessibility */
.ggsca-contact-box .ggsca-btn:focus,
.ggsca-floating-toggle:focus,
.ggsca-close-btn:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ggsca-floating-toggle {
        border: 2px solid white;
    }
    
    .ggsca-floating-content {
        border: 2px solid #000;
    }
    
    .ggsca-contact-box {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .ggsca-floating-toggle {
        animation: none;
    }
    
    .ggsca-floating-toggle:hover,
    .ggsca-floating-btn:hover,
    .ggsca-floating-profile:hover {
        transform: none;
    }
    
    .ggsca-floating-content,
    .ggsca-floating-content.show {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .ggsca-floating-contact {
        display: none !important;
    }
    
    .ggsca-contact-box {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ggsca-floating-content {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .ggsca-floating-profiles {
        background: #1a1a1a;
    }
    
    .ggsca-floating-profile {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .ggsca-floating-profile:hover {
        background: #3d3d3d;
    }
    
    .ggsca-floating-photo.ggsca-no-photo {
        background: #3d3d3d;
        color: #cccccc;
    }
    
    .ggsca-floating-name {
        color: #ffffff;
    }
    
    .ggsca-floating-job {
        color: #cccccc;
    }
}

/* Full width button when only one contact method */
.ggsca-btn-full {
    width: 100%;
    min-width: auto;
}

.ggsca-contact-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ggsca-contact-buttons .ggsca-btn-full {
    flex: 1;
    min-width: 0;
}
