/* Style for Coupgar Comunidad Feed */

/* Animaciones globales para comunidad */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes likePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.quick-post-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.quick-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-wrapper.small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #555555);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: black;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.avatar-wrapper.small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-quick-trigger {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quick-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

/* Feed Container */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 120px; /* Space for floating navigation */
    width: 100%;
}

.feed-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    gap: 15px;
}

.spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Post Card */
.post-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    animation: fadeIn 0.3s ease;
}

.post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-author-meta {
    display: flex;
    flex-direction: column;
}

.post-author-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
}

.post-author-username {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
}

.post-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.post-content {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-wrap;
}

.post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
}

.post-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.post-footer-actions {
    display: flex;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
    margin-top: 5px;
}

.btn-post-action {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-post-action:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.btn-post-action.liked {
    color: #ffffff;
}

.btn-post-action.liked svg {
    fill: #ffffff;
    stroke: #ffffff;
}

.btn-post-action svg {
    width: 16px;
    height: 16px;
}

/* Modal Content & Textarea Customization */
#post-content {
    width: 100%;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
}

#post-content:focus {
    border-color: rgba(255, 255, 255, 0.25);
}

.image-preview-container {
    position: relative;
    width: 100%;
    max-height: 200px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.remove-image-btn:hover {
    background: rgba(244, 63, 94, 0.8);
}

.post-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-action-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-action-outline:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tags-selector {
    display: flex;
    gap: 6px;
}

.tag-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.tag-pill.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Comments Modal Styles */
.comment-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: fadeIn 0.2s ease;
}

.comment-content-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 10px 14px;
}

.comment-author-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 2px;
}

.comment-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.comment-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    align-self: flex-end;
    margin-top: 4px;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
