/* WP Contact Icons Frontend Styles */

/* Base Styles */
.wci-contact-icons {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wci-contact-icons.wci-loaded {
    opacity: 1;
}

.wci-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wci-contact-icon:hover,
.wci-contact-icon:focus {
    text-decoration: none;
    outline: none;
}

.wci-contact-icon svg {
    fill: currentColor;
    transition: all 0.3s ease;
}

/* Tooltip Styles */
.wci-contact-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.wci-contact-icon[title]::after {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Platform specific styles */
.wci-whatsapp {
    background-color: #25D366;
    color: white;
}

.wci-whatsapp:hover {
    background-color: #128C7E;
    color: white;
}

.wci-telegram {
    background-color: #0088cc;
    color: white;
}

.wci-telegram:hover {
    background-color: #006699;
    color: white;
}

.wci-phone {
    background-color: #34495e;
    color: white;
}

.wci-phone:hover {
    background-color: #2c3e50;
    color: white;
}

/* Entrance Animations */
@keyframes wci-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes wci-slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wci-slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wci-slideInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wci-bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wci-zoomIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wci-rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

/* Hover Animations */
@keyframes wci-shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-2px);
    }
    75% {
        transform: translateX(2px);
    }
}

@keyframes wci-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes wci-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes wci-glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wci-contact-icons {
        gap: 8px;
    }
    
    .wci-contact-icon {
        min-width: 45px;
        min-height: 45px;
    }
    
    .wci-contact-icon svg {
        width: 20px;
        height: 20px;
    }
    
    /* Tooltip positioning for mobile */
    .wci-contact-icon[title]:hover::after {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .wci-contact-icons {
        gap: 6px;
    }
    
    .wci-contact-icon {
        min-width: 40px;
        min-height: 40px;
    }
    
    .wci-contact-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .wci-contact-icon svg {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Focus states for accessibility */
.wci-contact-icon:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wci-contact-icons,
    .wci-contact-icon,
    .wci-contact-icon svg {
        animation: none !important;
        transition: none !important;
    }
    
    .wci-contact-icon:hover {
        transform: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wci-contact-icon[title]::after {
        background: rgba(255, 255, 255, 0.9);
        color: black;
    }
}

/* Print styles */
@media print {
    .wci-contact-icons {
        display: none !important;
    }
}

/* Loading state */
.wci-contact-icons.wci-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Offline state */
.wci-contact-icons.wci-offline .wci-contact-icon {
    opacity: 0.6;
    cursor: not-allowed;
}

.wci-contact-icons.wci-offline .wci-contact-icon:hover {
    transform: none;
}

/* Custom positioning classes */
.wci-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.wci-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.wci-position-top-right {
    top: 20px;
    right: 20px;
}

.wci-position-top-left {
    top: 20px;
    left: 20px;
}

.wci-position-center-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.wci-position-center-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

/* Size variations */
.wci-size-small .wci-contact-icon {
    width: 40px;
    height: 40px;
}

.wci-size-small .wci-contact-icon svg {
    width: 16px;
    height: 16px;
}

.wci-size-medium .wci-contact-icon {
    width: 60px;
    height: 60px;
}

.wci-size-medium .wci-contact-icon svg {
    width: 24px;
    height: 24px;
}

.wci-size-large .wci-contact-icon {
    width: 80px;
    height: 80px;
}

.wci-size-large .wci-contact-icon svg {
    width: 32px;
    height: 32px;
}

/* Theme variations */
.wci-theme-minimal .wci-contact-icon {
    background: transparent;
    border: 2px solid currentColor;
}

.wci-theme-gradient .wci-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.wci-theme-gradient .wci-telegram {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.wci-theme-gradient .wci-phone {
    background: linear-gradient(135deg, #34495e, #2c3e50);
}

/* Shadow variations */
.wci-shadow-none .wci-contact-icon {
    box-shadow: none !important;
}

.wci-shadow-light .wci-contact-icon {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wci-shadow-medium .wci-contact-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wci-shadow-heavy .wci-contact-icon {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.wci-shadow-colored .wci-whatsapp {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.wci-shadow-colored .wci-telegram {
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}

.wci-shadow-colored .wci-phone {
    box-shadow: 0 4px 12px rgba(52, 73, 94, 0.4);
}

/* Border radius variations */
.wci-rounded-none .wci-contact-icon {
    border-radius: 0 !important;
}

.wci-rounded-small .wci-contact-icon {
    border-radius: 8px !important;
}

.wci-rounded-medium .wci-contact-icon {
    border-radius: 16px !important;
}

.wci-rounded-large .wci-contact-icon {
    border-radius: 24px !important;
}

.wci-rounded-full .wci-contact-icon {
    border-radius: 50% !important;
}

/* Animation delays for staggered entrance */
.wci-contact-icon:nth-child(1) {
    animation-delay: 0s;
}

.wci-contact-icon:nth-child(2) {
    animation-delay: 0.1s;
}

.wci-contact-icon:nth-child(3) {
    animation-delay: 0.2s;
}

.wci-contact-icon:nth-child(4) {
    animation-delay: 0.3s;
}

.wci-contact-icon:nth-child(5) {
    animation-delay: 0.4s;
}

/* Pulse effect for attention */
.wci-pulse-attention {
    animation: wci-pulse-attention 2s infinite;
}

@keyframes wci-pulse-attention {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Notification badge */
.wci-contact-icon .wci-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Floating animation */
.wci-floating {
    animation: wci-floating 3s ease-in-out infinite;
}

@keyframes wci-floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Click ripple effect */
.wci-contact-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.wci-contact-icon:active::before {
    width: 100%;
    height: 100%;
}

/* Accessibility improvements */
.wci-contact-icon:focus-visible {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* Screen reader only text */
.wci-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* RTL support */
[dir="rtl"] .wci-position-bottom-right {
    bottom: 20px;
    left: 20px;
    right: auto;
}

[dir="rtl"] .wci-position-bottom-left {
    bottom: 20px;
    right: 20px;
    left: auto;
}

[dir="rtl"] .wci-position-top-right {
    top: 20px;
    left: 20px;
    right: auto;
}

[dir="rtl"] .wci-position-top-left {
    top: 20px;
    right: 20px;
    left: auto;
}

[dir="rtl"] .wci-position-center-right {
    top: 50%;
    left: 20px;
    right: auto;
    transform: translateY(-50%);
}

[dir="rtl"] .wci-position-center-left {
    top: 50%;
    right: 20px;
    left: auto;
    transform: translateY(-50%);
}

/* Custom CSS hooks */
.wci-custom-theme .wci-contact-icon {
    /* Custom theme styles will be injected here */
}

/* Performance optimizations */
.wci-contact-icons {
    will-change: opacity, transform;
}

.wci-contact-icon {
    will-change: transform;
    backface-visibility: hidden;
}

/* Prevent layout shift */
.wci-contact-icons.wci-prevent-shift {
    visibility: hidden;
}

.wci-contact-icons.wci-prevent-shift.wci-loaded {
    visibility: visible;
}