 /* Twitter Feed Widget - Responsive Styling */

.twitter-feed-widget {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    height: 600px; /* ارتفاع ثابت للويدجت */
    border-radius: 16px; /* زوايا دائرية */
    box-shadow: 0 0.2px calc(0.15 * 600px) rgba(0, 0, 0, 0.2); /* ظل أخف */
    background-color: #f5f8fa; /* لون الخلفية */
    position: relative; /* تعيين الوضع النسبي */
    top: 0px; /* تحريك الويدجت لأعلى بمقدار 10 بكسل */
}

/* تحسين الـ Scrollbar */
.twitter-feed-widget::-webkit-scrollbar {
    width: 6px;
}

.twitter-feed-widget::-webkit-scrollbar-thumb {
    background-color: #1da1f2;
    border-radius: 10px;
}

.twitter-feed-widget::-webkit-scrollbar-track {
    background-color: #e1e8ed;
}

/* Twitter Header */
.twitter-header {
    height: auto;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    overflow: hidden;
}

.twitter-profile-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 12px;
}

.twitter-user-info {
    flex-grow: 1;
    font-size: 0.9em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.twitter-username {
    color: #000 !important;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.2em;
    display: block;
}

.twitter-handle {
    color: #657786;
    font-size: 1em;
    display: block;
}

/* Follow Button */
.twitter-follow-btn {
    background-color: #1da1f2;
    color: white;
    padding: 6px 6px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s ease-in-out;
}

.twitter-follow-btn:hover {
    background-color: #0c85d0;
}

/* Twitter Feed */
.twitter-feed {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto; /* تمرير عمودي فقط */
    height: calc(600px - 60px); /* ارتفاع قائمة التغريدات (600px - ارتفاع الهيدر) */
}

.twitter-feed li {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid #e1e8ed;
    font-size: 15px;
    background: #ffffff;
    width: 100%;
    color: #000 !important;
    border-radius: 10px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out;
}

.twitter-feed li:hover {
    background: #f5f8fa;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

.twitter-tweet-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.twitter-tweet-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.twitter-tweet-content {
    flex-grow: 1;
}

.twitter-tweet-text {
    color: #000;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 5px;
    white-space: normal;
    overflow-wrap: break-word;
}

/* Timestamp */
.twitter-timestamp {
    font-size: 13px;
    color: #657786;
}

/* تحسين عرض الصور والفيديوهات */
.twitter-tweet-media {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    grid-auto-rows: minmax(100px, auto);
    gap: 10px;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
}

.twitter-tweet-media img,
.twitter-tweet-media video {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.twitter-tweet-media img:hover,
.twitter-tweet-media video:hover {
    transform: scale(1.05);
}

/* أزرار التفاعل */
.twitter-tweet-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.twitter-tweet-buttons a {
    text-decoration: none;
    color: #1da1f2
;
    font-size: 14px;
    transition: color 0.3s;
}

.twitter-tweet-buttons a:hover {
    color: #1da1f2;
}

.twitter-tweet-buttons .like-btn,
.twitter-tweet-buttons .retweet-btn,
.twitter-tweet-buttons .reply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    cursor: pointer;
}

.twitter-tweet-buttons .like-btn i,
.twitter-tweet-buttons .retweet-btn i,
.twitter-tweet-buttons .reply-btn i {
    margin-right: 5px;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .twitter-feed-widget {
        height: 400px;
        max-width: 100%;
    }

    .twitter-profile-img {
        width: 36px;
        height: 36px;
    }

    .twitter-username {
        font-size: 1em;
    }

    .twitter-tweet-media {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .twitter-feed-widget {
        height: 450px;
        max-width: 100%;
    }
}

@media (min-width: 769px) {
    .twitter-feed-widget {
        height: 450px;
        min-width: 530px;
    }
}
