/* 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;
}

/* Facebook Video Embed */
.facebook-video-embed-inline {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.facebook-video-embed-inline iframe {
    width: 100%;
    height: 400px;
    border: none;
}

@media (max-width: 768px) {
    .facebook-video-embed-inline iframe {
        height: 300px;
    }
}

/* WhatsApp Action Bar - Premium Design */
/* Post Action Bar (Bottom of content) */
.post-action-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.post-action-bar .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.post-action-bar .whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
}

.post-action-bar .whatsapp-btn:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.post-action-bar .add-to-cart-btn {
    background: var(--primary-500, #3b82f6);
    color: white;
    border: none;
}

.post-action-bar .add-to-cart-btn:hover {
    background: var(--primary-600, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.post-action-bar .action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.post-action-bar .action-btn span {
    font-size: 0.875rem;
    line-height: 1;
}

/* Old WhatsApp styles (keep for backward compatibility) */
.whatsapp-action-bar {
    display: flex;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, rgba(32, 186, 90, 0.08) 100%);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-action-bar:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.12) 0%, rgba(32, 186, 90, 0.12) 100%);
    border-color: rgba(37, 211, 102, 0.3);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.15);
}

.whatsapp-button-bar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%) !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100%;
    max-width: 200px;
}

.whatsapp-button-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.whatsapp-button-bar:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4) !important;
    background: linear-gradient(135deg, #20BA5A 0%, #1DA851 100%) !important;
}

.whatsapp-button-bar:hover::before {
    left: 100%;
}

.whatsapp-button-bar:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
}

.whatsapp-button-bar svg {
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.whatsapp-button-bar span {
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Legacy support for old whatsapp-button class */
.whatsapp-mention {
    display: inline-block;
    margin: 0.5rem 0;
}

.whatsapp-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.625rem !important;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%) !important;
    color: white !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    margin: 0.5rem 0 !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Post Links */
.post-link {
    color: var(--primary-500);
    text-decoration: underline;
    word-break: break-all;
}

.post-link:hover {
    color: var(--primary-600);
    text-decoration: none;
}

/* ============================================
   SHARED LINK PREVIEW CARDS - PREMIUM DESIGN
   Better than Facebook's rendering
   ============================================ */

.shared-link-preview {
    margin: 1.25rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.shared-link-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-500, #1F3A5F) 0%, var(--primary-600, #192e4c) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shared-link-preview:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.shared-link-preview:hover::before {
    opacity: 1;
}

.shared-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

/* Image Section */
.shared-link-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.shared-link-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.shared-link-preview:hover .shared-link-image {
    transform: scale(1.05);
}

.shared-link-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
}

.shared-link-image-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* Body Section */
.shared-link-body {
    padding: 1.25rem 1.5rem;
    background: #ffffff;
}

.shared-link-header {
    margin-bottom: 0.75rem;
}

.shared-link-site-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.shared-link-preview:hover .shared-link-site-badge {
    background: rgba(0, 0, 0, 0.05);
    color: #4b5563;
}

.shared-link-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.7;
}

.shared-link-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.625rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.shared-link-preview:hover .shared-link-title {
    color: var(--primary-500, #1F3A5F);
}

.shared-link-description {
    font-size: 0.9375rem;
    color: #4b5563;
    margin: 0 0 1rem 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shared-link-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.shared-link-url {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-500, #1F3A5F);
    word-break: break-all;
    transition: color 0.2s ease;
}

.shared-link-preview:hover .shared-link-url {
    color: var(--primary-600, #192e4c);
}

.shared-link-url svg {
    flex-shrink: 0;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.shared-link-preview:hover .shared-link-url svg {
    transform: translate(2px, -2px);
}

/* Compact variant (no image) */
.shared-link-preview:not(:has(.shared-link-image-wrapper)) .shared-link-body {
    padding: 1.5rem;
}

.shared-link-preview:not(:has(.shared-link-image-wrapper)) .shared-link-image-wrapper {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .shared-link-preview {
        margin: 1rem 0;
        border-radius: 10px;
    }
    
    .shared-link-image-wrapper {
        height: 220px;
    }
    
    .shared-link-body {
        padding: 1rem 1.25rem;
    }
    
    .shared-link-title {
        font-size: 1rem;
    }
    
    .shared-link-description {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .shared-link-image-wrapper {
        height: 180px;
    }
    
    .shared-link-body {
        padding: 0.875rem 1rem;
    }
    
    .shared-link-site-badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }
}

.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, #1F3A5F);
}

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

.post-content {
    line-height: 1.6;
    word-wrap: break-word;
    color: #1f2937;
    font-size: 0.9375rem;
}

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

/* WhatsApp Button - Premium Design */
.whatsapp-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.625rem !important;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%) !important;
    color: white !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    margin: 0.5rem 0 !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.whatsapp-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4) !important;
    background: linear-gradient(135deg, #20BA5A 0%, #1DA851 100%) !important;
}

.whatsapp-button:hover::before {
    left: 100%;
}

.whatsapp-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
}

.whatsapp-button svg {
    flex-shrink: 0 !important;
    width: 18px !important;
    height: 18px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.whatsapp-button span {
    white-space: nowrap;
}

.whatsapp-mention {
    display: inline-block;
    margin: 0.5rem 0;
}

/* 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;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1;
}

/* 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;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.youtube-embed-inline iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1;
}

/* 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;
}

