/**
 * Share & QR Code Styles
 */

/* Share Modal */
.share-modal {
    width: 100%;
    max-width: 650px;
}

.share-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal .modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.share-modal .modal-body {
    padding: 1.5rem;
}

/* Share Options */
.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.share-option-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #e7f3ff 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.share-option-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.share-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.share-option-card h4 {
    margin: 0.5rem 0;
    color: #667eea;
    font-size: 1.1rem;
}

.share-option-card p {
    margin: 0.3rem 0;
    font-size: 0.85rem;
    color: #6c757d;
}

/* Share Settings */
.share-settings {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.share-settings h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1rem;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.setting-item label {
    font-weight: 600;
    color: #495057;
    min-width: 150px;
}

.form-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Share Actions */
.share-actions {
    margin: 1.5rem 0;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Share Results */
.share-results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0fff4 0%, #e7f3ff 100%);
    border: 2px solid #28a745;
    border-radius: 12px;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-results h4 {
    margin-top: 0;
    color: #28a745;
    font-size: 1.2rem;
    text-align: center;
}

/* QR Code Container */
.qr-code-container {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-code-image {
    max-width: 250px;
    width: 100%;
    height: auto;
    border: 3px solid #667eea;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 10px;
    background: white;
}

/* Share Link Container */
.share-link-container {
    margin: 1.5rem 0;
}

.share-link-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.link-input-group {
    display: flex;
    gap: 0.5rem;
}

.link-input-group .form-input {
    flex: 1;
    font-family: monospace;
    font-size: 0.9rem;
    background: white;
}

.link-input-group .btn {
    min-width: 120px;
}

/* Share Stats */
.share-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    font-family: monospace;
}

/* Social Share */
.social-share {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #dee2e6;
}

.social-share h5 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1rem;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.social-btn {
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-btn.whatsapp {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.social-btn.whatsapp:hover {
    background: #20ba5a;
}

.social-btn.email {
    background: #0078D4;
    color: white;
    border-color: #0078D4;
}

.social-btn.email:hover {
    background: #006abc;
}

.social-btn.telegram {
    background: #0088cc;
    color: white;
    border-color: #0088cc;
}

.social-btn.telegram:hover {
    background: #007ab8;
}

.social-btn.native {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.social-btn.native:hover {
    background: #5a6268;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Share Button (Floating) */
.share-pdf-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 1000;
    display: none;
}

.share-pdf-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.share-pdf-btn::before {
    content: '🔗 ';
}

/* Responsive */
@media (max-width: 768px) {
    .share-modal {
        width: 95%;
        max-width: 95%;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
    
    .share-option-card {
        padding: 1rem;
    }
    
    .share-icon {
        font-size: 2.5rem;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .setting-item label {
        min-width: auto;
    }
    
    .link-input-group {
        flex-direction: column;
    }
    
    .link-input-group .btn {
        width: 100%;
    }
    
    .share-stats {
        grid-template-columns: 1fr;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
    
    .qr-code-image {
        max-width: 200px;
    }
    
    .share-pdf-btn {
        bottom: 70px;
        right: 15px;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .share-option-card {
        background: linear-gradient(135deg, #2a2a3a 0%, #1a1a2a 100%);
        border-color: #444;
    }
    
    .share-settings {
        background: #2a2a2a;
    }
    
    .form-input {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .share-results {
        background: linear-gradient(135deg, #1a2a1a 0%, #1a2a3a 100%);
        border-color: #28a745;
    }
    
    .qr-code-container,
    .share-stats {
        background: #2a2a2a;
    }
    
    .stat-label {
        color: #aaa;
    }
    
    .stat-value {
        color: #e0e0e0;
    }
    
    .link-input-group .form-input {
        background: #1a1a1a;
    }
}

/* Print Styles (hide share button when printing) */
@media print {
    .share-pdf-btn {
        display: none !important;
    }
}
