/**
 * ZooSpace Poster Generator - Social Share Styles
 * 
 * Minimal icon-only design
 * 
 * @package ZooSpace_Poster_Generator
 * @since 2.0.0
 */

/* Social Share Container */
.zoospace-social-share-wrapper {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.zoospace-social-share-wrapper h4 {
    display: none; /* Hide the title for cleaner look */
}

.zoospace-social-share-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Base Button Style - Small icon only */
.zoospace-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    color: #fff;
}

/* Hide text labels */
.zoospace-share-btn span {
    display: none;
}

.zoospace-share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.zoospace-share-btn:active {
    transform: scale(1);
}

.zoospace-share-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.zoospace-share-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Icon Style */
.zoospace-share-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Facebook Button */
.zoospace-share-facebook {
    background: #1877f2;
}

/* WhatsApp Button */
.zoospace-share-whatsapp {
    background: #25d366;
}

/* Viber Button */
.zoospace-share-viber {
    background: #7360f2;
}

/* Twitter/X Button */
.zoospace-share-twitter {
    background: #000;
}

/* Instagram Button */
.zoospace-share-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Copy Link Button */
.zoospace-share-copy {
    background: #6b7280;
}

.zoospace-share-copy.copied {
    background: #10b981;
}

/* Status Message */
.zoospace-share-status {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 8px;
}

.zoospace-share-status.success {
    background: #d1fae5;
    color: #065f46;
}

.zoospace-share-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.zoospace-share-status.info {
    background: #dbeafe;
    color: #1e40af;
}

/* Modal Styles */
.zoospace-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoospace-share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.zoospace-share-modal-content {
    position: relative;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.zoospace-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoospace-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.zoospace-share-modal-content h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #111827;
    display: flex;
    align-items: center;
}

.zoospace-share-modal-content h3 svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Instagram Steps */
.zoospace-instagram-steps {
    margin: 16px 0;
}

.zoospace-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}

.zoospace-step:last-child {
    border-bottom: none;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.step-text {
    color: #374151;
    line-height: 1.4;
}

/* Copied Notice */
.zoospace-instagram-copied-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #d1fae5;
    border-radius: 8px;
    color: #065f46;
    margin: 16px 0;
    font-size: 13px;
}

.zoospace-instagram-copied-notice svg {
    color: #10b981;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Modal Button */
.zoospace-modal-button {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.zoospace-modal-button:hover {
    opacity: 0.9;
}

/* Loading State */
.zoospace-share-btn.loading {
    position: relative;
    color: transparent;
}

.zoospace-share-btn.loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive - slightly larger on mobile for touch */
@media (max-width: 480px) {
    .zoospace-share-btn {
        width: 36px;
        height: 36px;
    }
    
    .zoospace-share-icon {
        width: 18px;
        height: 18px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .zoospace-social-share-wrapper {
        border-top-color: #374151;
    }
    
    .zoospace-share-modal-content {
        background: #1f2937;
    }
    
    .zoospace-share-modal-content h3 {
        color: #f9fafb;
    }
    
    .zoospace-modal-close {
        background: #374151;
        color: #9ca3af;
    }
    
    .zoospace-modal-close:hover {
        background: #4b5563;
        color: #f9fafb;
    }
    
    .zoospace-step {
        border-bottom-color: #374151;
    }
    
    .step-text {
        color: #d1d5db;
    }
    
    .zoospace-instagram-copied-notice {
        background: #064e3b;
        color: #a7f3d0;
    }
}

/* Print Styles - Hide */
@media print {
    .zoospace-social-share-wrapper,
    .zoospace-share-modal {
        display: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .zoospace-share-btn,
    .zoospace-share-btn.loading::after {
        animation: none;
        transition: none;
    }
    
    .zoospace-share-btn:hover {
        transform: none;
    }
}