/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
    font-size: 0.875rem;
    color: var(--gray-900);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Post Actions - Interactive States */
.post-action.liked {
    color: var(--primary-600);
}

.post-action.liked svg {
    fill: var(--primary-600);
}

.suitcase-btn.active.good {
    color: #10b981;
}

.suitcase-btn.active.bad {
    color: #ef4444;
}

.suitcase-btn:active {
    transform: scale(0.95);
}

/* Comment Input Animation */
.comment-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* Smooth Transitions */
.post-card,
.media-item,
.service-item {
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover,
.media-item:hover {
    transform: translateY(-2px);
}

/* AJAX Loading Overlay */
.ajax-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ajax-loading-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.ajax-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Success/Error States */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
    border-color: #ef4444;
}

.form-group.has-success input,
.form-group.has-success textarea,
.form-group.has-success select {
    border-color: #10b981;
}

.form-error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 4px;
}

.form-success-message {
    color: #10b981;
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Hashtags and Mentions Styles */
.hashtag-link,
.mention-link {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}

.hashtag-link:hover,
.mention-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
    text-decoration: underline;
}

.hashtag-link {
    color: var(--primary-500, #c8102e);
}

.mention-link {
    color: var(--success-color, #28a745);
}

.post-content {
    line-height: 1.6;
    word-wrap: break-word;
}

.post-content a {
    text-decoration: none;
}

/* Animation for new comments - smoother */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Smooth fade-in for comments */
.comment-item {
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.comment-item.comment-reply {
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* YouTube Embed Styles */
.youtube-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    margin: 1rem 0;
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* YouTube embed inline (from text content) */
.youtube-embed-inline {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
    margin: 1rem 0;
}

.youtube-embed-inline iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Media Preview Styles */
.media-preview-content {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gray-50, #f9fafb);
    border-radius: 8px;
    position: relative;
}

.media-preview-content img,
.media-preview-content video {
    max-width: 100%;
    border-radius: 8px;
    display: block;
}

.btn-remove-media {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-remove-media:hover {
    background: #dc2626;
}

