/**
 * Share Modal Styles
 * För delning av projekt på sociala medier
 */

/* 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);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal */
.share-modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.share-modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
}

.share-modal-header h3 svg {
    width: 24px;
    height: 24px;
    color: #3b82f6;
}

.close-modal {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal:hover {
    background: #f1f5f9;
}

.close-modal svg {
    width: 24px;
    height: 24px;
    color: #64748b;
}

/* Body */
.share-modal-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Preview Section */
.share-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-label {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.og-card-preview {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.og-card-preview:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.og-image {
    width: 100%;
    aspect-ratio: 1.91/1;
    background: #f1f5f9;
    overflow: hidden;
}

.og-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.og-content {
    padding: 1rem;
    background: #fafafa;
}

.og-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.4;
}

.og-content p {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

.og-url {
    display: inline-block;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Share Link Section */
.share-link-section label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.share-link-box {
    display: flex;
    gap: 0.5rem;
}

.share-link-box input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    background: #fafafa;
    color: #1e293b;
}

.share-link-box input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-copy.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-copy svg {
    width: 18px;
    height: 18px;
}

/* Social Buttons */
.share-socials p {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

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

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: none;
}

.social-btn i,
.social-btn svg {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.2s;
    display: inline-block;
    vertical-align: middle;
}

.social-btn svg {
    fill: currentColor;
}

.social-btn:hover i,
.social-btn:hover svg {
    transform: scale(1.1);
}

.social-btn.facebook {
    background: #1877f2;
    color: white;
}

.social-btn.facebook:hover {
    background: #145dbf;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

.social-btn.linkedin {
    background: #0a66c2;
    color: white;
}

.social-btn.linkedin:hover {
    background: #084d92;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(10, 102, 194, 0.4);
}

.social-btn.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border: none;
    cursor: pointer;
}

.social-btn.instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(225, 48, 108, 0.4);
    filter: brightness(1.1);
}

.social-btn.twitter {
    background: #000000;
    color: white;
}

.social-btn.twitter:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.social-btn.email {
    background: #64748b;
    color: white;
}

.social-btn.email:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(100, 116, 139, 0.4);
}

/* Tips Section */
.share-tips {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
}

.share-tips svg {
    width: 24px;
    height: 24px;
    color: #0ea5e9;
    flex-shrink: 0;
    margin-top: 2px;
}

.share-tips strong {
    display: block;
    font-size: 0.95rem;
    color: #0c4a6e;
    margin-bottom: 0.5rem;
}

.share-tips ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #075985;
    font-size: 0.875rem;
    line-height: 1.6;
}

.share-tips li {
    margin-bottom: 0.25rem;
}

/* Analytics Section */
.share-analytics {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #cbd5e1;
}

.share-analytics h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #1e293b;
}

.share-analytics h4 svg {
    width: 20px;
    height: 20px;
    color: #3b82f6;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1023px) {
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.analytics-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.analytics-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
}

.analytics-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
    text-align: center;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .share-modal {
        width: 95%;
        max-height: 88vh;
        border-radius: 16px;
        overflow-y: auto;
    }

    .share-modal-header {
        padding: 1rem 1.5rem;
    }

    .share-modal-header h3 {
        font-size: 1.125rem;
    }

    .close-modal {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
    }

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

    .social-buttons {
        grid-template-columns: 1fr;
    }

    .social-buttons button {
        min-height: 44px;
        padding: 12px 20px;
    }

    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .share-link-box {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .og-content h4 {
        font-size: 0.95rem;
    }

    .og-content p {
        font-size: 0.8rem;
    }
}

/* ==================== INSTAGRAM INSTRUCTIONS MODAL ==================== */

.instagram-instructions-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s;
}

.instagram-instructions-modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

.instagram-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.instagram-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.25rem;
}

.instagram-header h3 i {
    font-size: 1.5rem;
}

.close-instagram {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.close-instagram:hover {
    background: rgba(255, 255, 255, 0.3);
}

.close-instagram i {
    font-size: 1.25rem;
}

.instagram-body {
    padding: 2rem;
}

.instagram-method {
    display: flex;
    align-items: start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.method-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f09433 0%, #dc2743 100%);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.method-content {
    flex: 1;
}

.method-content h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    color: #1e293b;
}

.method-content p {
    margin: 0 0 1rem 0;
    color: #64748b;
    line-height: 1.6;
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.qr-code {
    width: 200px;
    height: 200px;
    border-radius: 8px;
}

.qr-hint {
    margin: 1rem 0 0 0;
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
}

.method-divider {
    text-align: center;
    padding: 1rem 0;
    color: #94a3b8;
    font-weight: 600;
    position: relative;
}

.method-divider::before,
.method-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e5e7eb;
}

.method-divider::before {
    left: 0;
}

.method-divider::after {
    right: 0;
}

.instagram-steps {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
    color: #64748b;
}

.instagram-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.instagram-link-box {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.instagram-link-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    background: #fafafa;
}

.instagram-link-box input:focus {
    outline: none;
    border-color: #dc2743;
}

.instagram-link-box button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f09433 0%, #dc2743 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.instagram-link-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.4);
}

.instagram-tip {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1.5rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.instagram-tip i {
    font-size: 1.5rem;
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
}

.instagram-tip strong {
    display: block;
    font-size: 0.95rem;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.instagram-tip p {
    font-size: 0.875rem;
    color: #78350f;
    margin: 0;
    line-height: 1.6;
}

/* Responsive Instagram Modal */
@media (max-width: 768px) {
    .instagram-instructions-modal {
        width: 95%;
    }

    .instagram-header {
        padding: 1rem 1.5rem;
    }

    .instagram-header h3 {
        font-size: 1.125rem;
    }

    .instagram-body {
        padding: 1.5rem;
    }

    .instagram-method {
        flex-direction: column;
        gap: 1rem;
    }

    .method-number {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }

    .qr-code {
        width: 180px;
        height: 180px;
    }

    .instagram-link-box {
        flex-direction: column;
    }

    .instagram-link-box button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .qr-code {
        width: 150px;
        height: 150px;
    }

    .method-content h4 {
        font-size: 1rem;
    }

    .instagram-steps {
        font-size: 0.875rem;
    }
}
