/* TweetEmbed Component Styles */

.tweet-embed-container {
    margin: 10px 0;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.tweet-embed-content {
    width: 100%;
    max-width: 550px;
    min-height: 200px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tweet-embed-content .twitter-tweet {
    margin: 0 !important;
    border-radius: 8px !important;
}

/* Loading and Error States */
.tweet-embed-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.tweet-embed-error {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
}

/* Enhanced Hover Preview Styles */
.tweet-link-container {
    position: relative;
    display: inline-block;
}

.tweet-link {
    text-decoration: none;
    color: #1da1f2;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.tweet-link:hover {
    background-color: rgba(29, 161, 242, 0.1);
    color: #1da1f2;
    text-decoration: none;
}

.tweet-preview-popup {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 350px;
    max-width: 500px;
    margin-top: 5px;
    animation: fadeInUp 0.2s ease-out;
}

.tweet-preview-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #dee2e6;
}

.tweet-preview-popup::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.tweet-preview-popup .tweet-embed-content {
    max-height: 400px;
    overflow: hidden;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.tweet-embed-content .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Error states */
.tweet-embed-content .alert {
    margin: 1rem;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tweet-embed-container {
        margin: 0.5rem 0;
    }
    
    .tweet-embed-content {
        max-width: 100%;
        margin: 0 0.5rem;
    }

    .tweet-preview-popup {
        min-width: 280px;
        max-width: 320px;
    }
}