/**
 * Towa Linkcard Styles
 * シンプルで読みやすいリンクカード
 */

.towa-linkcard {
    display: flex;
    align-items: stretch;
    max-width: 100%;
    margin: 1.5rem 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.towa-linkcard:hover {
    border-color: #2A7B7B;
    box-shadow: 0 4px 12px rgba(42, 123, 123, 0.15);
    transform: translateY(-2px);
}

/* 画像部分 */
.towa-linkcard__image {
    flex-shrink: 0;
    width: 160px;
    min-height: 100px;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.towa-linkcard__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.towa-linkcard:hover .towa-linkcard__image img {
    transform: scale(1.05);
}

.towa-linkcard__image--noimage {
    background: linear-gradient(135deg, #e2e8f0 0%, #edf2f7 100%);
}

.towa-linkcard__image--noimage span {
    font-size: 0.75rem;
    color: #a0aec0;
    font-weight: 500;
}

/* コンテンツ部分 */
.towa-linkcard__content {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.towa-linkcard__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.towa-linkcard:hover .towa-linkcard__title {
    color: #2A7B7B;
}

.towa-linkcard__site {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #718096;
}

.towa-linkcard__favicon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    flex-shrink: 0;
}

.towa-linkcard__site span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* シンプルリンク（OGP取得失敗時） */
.towa-linkcard--simple {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.9rem;
    word-break: break-all;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .towa-linkcard {
        flex-direction: column;
    }

    .towa-linkcard__image {
        width: 100%;
        height: 140px;
    }

    .towa-linkcard__content {
        padding: 12px 16px;
    }

    .towa-linkcard__title {
        font-size: 0.9rem;
    }
}
