/**
 * Share Functionality Styles
 * 
 * Styles for shareable results feature including:
 * - Share buttons
 * - Share modal
 * - Social media buttons
 * - Notifications
 * 
 * @package ShowMyIP
 * @version 1.0.0
 */

/* ============================================
   Share Result Button
   ============================================ */

.share-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 15px;
}

.share-result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.share-result-btn:active {
    transform: translateY(0);
}

.share-result-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.share-result-btn i {
    font-size: 16px;
}

/* Small variant */
.share-result-btn.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ============================================
   Share Modal Overlay
   ============================================ */

.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.share-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.share-modal-overlay.show .share-modal {
    transform: scale(1);
    opacity: 1;
}

/* ============================================
   Share Modal
   ============================================ */

.share-modal {
    background: white;
    border-radius: 16px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #e9ecef;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-modal-header h3 i {
    color: #667eea;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #f7fafc;
    color: #4a5568;
}

/* ============================================
   Share Modal Body
   ============================================ */

.share-modal-body {
    padding: 28px;
}

.share-description {
    margin: 0 0 20px 0;
    color: #4a5568;
    font-size: 15px;
    line-height: 1.6;
}

.share-description small {
    font-size: 13px;
    color: #718096;
}

/* ============================================
   Share Link Container
   ============================================ */

.share-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.share-link-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background: #f7fafc;
    font-family: 'Courier New', monospace;
}

.share-link-container input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.share-link-container .copy-share-link {
    padding: 12px 20px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.share-link-container .copy-share-link:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.share-link-container .copy-share-link.btn-success {
    background: #48bb78;
}

/* ============================================
   Social Share Buttons
   ============================================ */

.social-share-buttons {
    margin-bottom: 24px;
}

.social-share-buttons h4 {
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 16px 0;
}

.social-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.social-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-share-btn i {
    font-size: 16px;
}

/* Platform-specific colors */
.social-share-btn.twitter {
    background: #1da1f2;
}

.social-share-btn.twitter:hover {
    background: #1a91da;
}

.social-share-btn.linkedin {
    background: #0077b5;
}

.social-share-btn.linkedin:hover {
    background: #006399;
}

.social-share-btn.facebook {
    background: #1877f2;
}

.social-share-btn.facebook:hover {
    background: #166fe5;
}

.social-share-btn.reddit {
    background: #ff4500;
}

.social-share-btn.reddit:hover {
    background: #e03d00;
}

/* ============================================
   Share Stats
   ============================================ */

.share-stats {
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.share-stats small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #718096;
    font-size: 13px;
}

.share-stats i {
    color: #a0aec0;
}

/* ============================================
   Notification Toast
   ============================================ */

.share-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.share-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.share-notification i {
    font-size: 20px;
}

.share-notification.success {
    border-left: 4px solid #48bb78;
}

.share-notification.success i {
    color: #48bb78;
}

.share-notification.error {
    border-left: 4px solid #f56565;
}

.share-notification.error i {
    color: #f56565;
}

.share-notification span {
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   Dark Mode Support
   ============================================ */

.dark-mode .share-modal {
    background: #2d3748;
}

.dark-mode .share-modal-header {
    border-bottom-color: #4a5568;
}

.dark-mode .share-modal-header h3 {
    color: #e2e8f0;
}

.dark-mode .close-modal {
    color: #a0aec0;
}

.dark-mode .close-modal:hover {
    background: #4a5568;
    color: #e2e8f0;
}

.dark-mode .share-description {
    color: #cbd5e0;
}

.dark-mode .share-link-container input {
    background: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
}

.dark-mode .share-link-container input:focus {
    background: #2d3748;
    border-color: #667eea;
}

.dark-mode .social-share-buttons h4 {
    color: #cbd5e0;
}

.dark-mode .share-stats {
    border-top-color: #4a5568;
}

.dark-mode .share-notification {
    background: #2d3748;
}

.dark-mode .share-notification span {
    color: #e2e8f0;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 576px) {
    .share-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }
    
    .share-modal-header {
        padding: 20px;
    }
    
    .share-modal-header h3 {
        font-size: 18px;
    }
    
    .share-modal-body {
        padding: 20px;
    }
    
    .social-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .share-link-container {
        flex-direction: column;
    }
    
    .share-link-container .copy-share-link {
        width: 100%;
    }
    
    .share-notification {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }
}
