/* Social Media Popup/Modal Styles */

/* Modal Overlay */
.social-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--black-rgb), 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.social-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.social-modal-container {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(var(--black-rgb), 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.7) translateY(50px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    border: 2px solid rgba(var(--white-rgb), 0.2);
}

.social-modal-overlay.active .social-modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.social-modal-header {
    background: rgba(var(--white-rgb), 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(var(--white-rgb), 0.2);
}

.social-modal-header h3 {
    margin: 0;
    color: var(--white);
    font-size: 1.5em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(var(--black-rgb), 0.3);
}

/* Modal Content */
.social-modal-content {
    padding: 30px;
    text-align: center;
    background: rgba(var(--white-rgb), 0.95);
    backdrop-filter: blur(10px);
}

.social-modal-content p {
    margin: 0 0 25px 0;
    color: var(--text-color);
    font-size: 1.1em;
    line-height: 1.6;
    font-weight: 500;
}

.social-modal-content .social-platform {
    font-weight: 700;
    color: var(--primary);
    text-transform: capitalize;
}

/* Close Button */
.social-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(var(--white-rgb), 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(var(--white-rgb), 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.social-modal-close:hover {
    background: rgba(var(--white-rgb), 0.3);
    border-color: rgba(var(--white-rgb), 0.5);
    transform: rotate(90deg);
}

.social-modal-close::before,
.social-modal-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
}

.social-modal-close::before {
    transform: rotate(45deg);
}

.social-modal-close::after {
    transform: rotate(-45deg);
}

/* Social Icon Preview */
.social-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(var(--white-rgb), 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-medium-alt);
    border: 3px solid var(--accent);
}

.social-modal-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-modal-container {
        max-width: 95%;
        width: 95%;
        margin: 20px;
    }
    
    .social-modal-content {
        padding: 25px 20px;
    }
    
    .social-modal-content p {
        font-size: 1em;
    }
    
    .social-modal-header h3 {
        font-size: 1.3em;
    }
    
    .social-modal-icon {
        width: 70px;
        height: 70px;
    }
    
    .social-modal-icon img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .social-modal-container {
        max-width: 98%;
        width: 98%;
        margin: 10px;
    }
    
    .social-modal-content {
        padding: 20px 15px;
    }
    
    .social-modal-content p {
        font-size: 0.95em;
        line-height: 1.5;
    }
    
    .social-modal-header h3 {
        font-size: 1.2em;
        padding: 15px;
    }
    
    .social-modal-icon {
        width: 60px;
        height: 60px;
    }
    
    .social-modal-icon img {
        width: 35px;
        height: 35px;
    }
    
    .social-modal-close {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
    
    .social-modal-close::before,
    .social-modal-close::after {
        width: 15px;
        height: 2px;
    }
}

/* Animation for modal entrance */
@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
}

/* Gradient animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Additional visual effects */
.social-modal-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent), var(--secondary), var(--primary), var(--accent));
    border-radius: 16px;
    z-index: -1;
    opacity: 0.7;
    animation: borderRotate 3s linear infinite;
    background-size: 400% 400%;
}

@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Loading state animation */
.social-modal-content.loading {
    position: relative;
    overflow: hidden;
}

.social-modal-content.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--white-rgb), 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}
