/**
 * SHARE TO FEED - Estilos para compartir contenido en el feed
 */

/* Modal */
.share-feed-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.share-feed-modal.active {
    opacity: 1;
    pointer-events: all;
}

.share-feed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.share-feed-container {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.share-feed-modal.active .share-feed-container {
    transform: scale(1);
}

/* Header */
.share-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.share-feed-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.share-feed-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.share-feed-close:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Content */
.share-feed-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Preview */
.share-feed-preview {
    margin-bottom: 20px;
}

.share-preview-evento,
.share-preview-foto,
.share-preview-galeria {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    gap: 12px;
    padding: 12px;
}

.share-preview-image {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: #e5e7eb;
    border-radius: 8px;
}

.share-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-preview-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.share-preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.share-preview-info h4 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-preview-info p {
    margin: 0;
    font-size: 0.8125rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.share-preview-info i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Preview de Foto */
.share-preview-foto {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.share-preview-foto .share-preview-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.share-preview-foto .share-preview-info {
    flex: 1;
}

.share-preview-origin {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: #6b7280;
}

.share-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 2rem;
}

/* Galería Grid */
.share-preview-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    aspect-ratio: 1;
}

.share-preview-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-preview-more {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Comment */
.share-feed-comment {
    position: relative;
}

.share-feed-comment textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.share-feed-comment textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.share-feed-char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.75rem;
    color: #9ca3af;
    pointer-events: none;
}

/* Footer */
.share-feed-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
}

.share-feed-footer button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-feed-cancel {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.share-feed-cancel:hover {
    background: #e5e7eb;
}

.share-feed-submit {
    background: #3b82f6;
    border: none;
    color: white;
}

.share-feed-submit:hover {
    background: #2563eb;
}

.share-feed-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Botón de compartir (para agregar en cards, lightbox, etc.) */
.share-to-feed-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.share-to-feed-btn:hover {
    background: #f3f4f6;
    color: #3b82f6;
}

.share-to-feed-btn i {
    font-size: 1rem;
}

/* Variante con fondo */
.share-to-feed-btn.with-bg {
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.share-to-feed-btn.with-bg:hover {
    background: #f9fafb;
    border-color: #3b82f6;
}

/* Responsive */
@media (max-width: 640px) {
    .share-feed-modal {
        align-items: flex-end;
    }

    .share-feed-container {
        width: 100%;
        max-width: 100%;
        max-height: 65vh;
        border-radius: 16px 16px 0 0;
        animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .share-feed-header {
        padding: 16px 20px;
    }
    
    .share-feed-content {
        padding: 16px 20px;
    }
    
    .share-feed-footer {
        padding: 16px 20px;
    }

    .share-preview-evento {
        flex-direction: row;
        padding: 10px;
        gap: 10px;
    }

    .share-preview-image {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
    }

    .share-preview-info h4 {
        font-size: 0.875rem;
    }

    .share-preview-info p {
        font-size: 0.75rem;
    }
}
