/* ============================================================
   LaIA Twitter Feed - Estils
   ============================================================ */

/* Targeta del tweet */
.laia-tweet-card {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #14171a;
    transition: box-shadow 0.2s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.laia-tweet-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Capçalera */
.laia-tweet-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.laia-tweet-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.laia-tweet-user {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.laia-tweet-user strong {
    display: block;
    font-size: 14px;
    color: #14171a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.laia-tweet-username {
    display: block;
    font-size: 12px;
    color: #657786;
}

.laia-tweet-link {
    color: #536471;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
    text-decoration: none;
}

.laia-tweet-link:hover {
    opacity: 1;
    color: #1d9bf0;
}

/* Text del tweet */
.laia-tweet-text {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    margin: 0;
}

.laia-tweet-text a {
    color: #1d9bf0;
    text-decoration: none;
}

.laia-tweet-text a:hover {
    text-decoration: underline;
}

/* Imatges */
.laia-tweet-media {
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.laia-tweet-media-single {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.laia-tweet-media-multi {
    flex: 1 1 calc(50% - 2px);
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* Footer */
.laia-tweet-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #657786;
    border-top: 1px solid #eff3f4;
    padding-top: 8px;
}

/* ============================================================
   MODE: CARRUSEL
   ============================================================ */
.laia-twitter-carousel.swiper {
    padding: 4px 0 40px;
    overflow: hidden;
    position: relative;
}

.laia-twitter-carousel .swiper-slide {
    height: auto;
    display: flex;
}

.laia-twitter-carousel .swiper-slide .laia-tweet-card {
    width: 100%;
}

.laia-twitter-carousel .swiper-pagination {
    bottom: 4px;
}

.laia-twitter-carousel .swiper-pagination-bullet {
    background: #536471;
    opacity: 0.4;
}

.laia-twitter-carousel .swiper-pagination-bullet-active {
    background: #1d9bf0;
    opacity: 1;
}

.laia-twitter-carousel .swiper-button-prev,
.laia-twitter-carousel .swiper-button-next {
    color: #1d9bf0 !important;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-top: -18px;
}

.laia-twitter-carousel .swiper-button-prev::after,
.laia-twitter-carousel .swiper-button-next::after {
    font-size: 14px !important;
    font-weight: bold;
}

/* ============================================================
   MODE: GALERIA
   ============================================================ */
.laia-twitter-gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.laia-twitter-gallery-item {
    min-width: 0;
}

.laia-twitter-gallery-item .laia-tweet-card {
    height: 100%;
}

/* ============================================================
   MODE: LLISTA
   ============================================================ */
.laia-twitter-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .laia-twitter-gallery {
        grid-template-columns: 1fr !important;
    }

    .laia-tweet-media-multi {
        flex: 1 1 100%;
        height: 200px;
    }
}

@media (max-width: 900px) and (min-width: 601px) {
    .laia-twitter-gallery[style*="repeat"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
