/* Link Preview Cards — front-end & editor styles */

.lpc-card {
    display: block;
    margin: 1.5em 0;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    width: 100%;
    min-width: 450px;
}

.lpc-card:hover {
    border-color: #AF8C62;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
    transform: translateY(-1px);
}

.lpc-card__link {
    display: flex;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: none !important;
}

.lpc-card__link:hover,
.lpc-card__link:focus {
    text-decoration: none !important;
    color: inherit !important;
}

.lpc-card__image {
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.lpc-card__body {
    flex: 1;
    padding: 16px 20px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lpc-card__site {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 500;
}

.lpc-card__favicon {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    border-radius: 3px;
    flex-shrink: 0;
}

.lpc-card__title {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    color: #1f2328 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lpc-card__description {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #57606a !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Horizontal (default) ---------- */
.lpc-style-horizontal .lpc-card__image {
    width: 200px;
    min-height: 140px;
}

@media (max-width: 540px) {
    .lpc-style-horizontal .lpc-card__link {
        flex-direction: column;
    }
    .lpc-style-horizontal .lpc-card__image {
        width: 100%;
        height: 180px;
    }
}

/* ---------- Vertical ---------- */
.lpc-style-vertical .lpc-card__link {
    flex-direction: column;
}

.lpc-style-vertical .lpc-card__image {
    width: 100%;
    height: 240px;
}

/* ---------- Compact ---------- */
.lpc-style-compact.lpc-card {
    max-width: 600px;
}

.lpc-style-compact .lpc-card__body {
    padding: 12px 16px;
}

.lpc-style-compact .lpc-card__title {
    font-size: 15px !important;
    -webkit-line-clamp: 1;
}

.lpc-style-compact .lpc-card__description {
    -webkit-line-clamp: 2;
    font-size: 13px !important;
}

/* ---------- Fallback ---------- */
.lpc-fallback {
    margin: 1em 0;
    padding: 12px 16px;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    font-size: 14px;
}

.lpc-fallback a {
    color: #2271b1;
    word-break: break-all;
}

/* ---------- Dark mode ---------- */
/*@media (prefers-color-scheme: dark) {*/
/*    .lpc-card {*/
/*        background: #1c2128;*/
/*        border-color: #30363d;*/
/*    }*/
/*    .lpc-card:hover {*/
/*        border-color: #58a6ff;*/
/*    }*/
/*    .lpc-card__title       { color: #e6edf3 !important; }*/
/*    .lpc-card__description { color: #8b949e !important; }*/
/*    .lpc-card__site        { color: #8b949e; }*/
/*    .lpc-card__image       { background-color: #2d333b; }*/
/*    .lpc-fallback          { background: #161b22; border-color: #30363d; }*/
/*}*/
