/* css/ad-box.css
   Styling box iklan — mengikuti tema dark/light dari style.css
   Variabel CSS: --bg-body, --text-main, --text-muted, --border-color,
                 --primary-color, --input-bg, --card-hover
*/

/* ---- Widget container (rightbar) ---- */
.adbox-widget {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin: 0 0 16px 0;
    transition: border-color 0.2s, background-color 0.3s;
}
.adbox-widget:hover {
    border-color: var(--primary-color);
}
.adbox-admin {
    border-color: var(--primary-color);
}

/* ---- Iklan inline di timeline (mirip .post) ---- */
.adbox-timeline-inline {
    background-color: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    transition: background-color 0.2s;
}
.adbox-timeline-inline:hover {
    background-color: var(--card-hover);
}

/* ---- Label "Sponsored" ---- */
.adbox-label {
    font-size: 11px;
    color: var(--text-muted);
    padding: 10px 12px 0 12px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}
.adbox-label i {
    font-size: 12px;
    color: var(--primary-color);
}
.adbox-timeline-inline .adbox-label {
    padding: 0 0 6px 0;
}

/* ---- Link wrapper ---- */
.adbox-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.adbox-link:hover .adbox-title {
    color: var(--primary-color);
}

/* ---- Gambar ---- */
.adbox-image-wrap {
    width: 100%;
    overflow: hidden;
    margin-top: 6px;
}
.adbox-widget .adbox-image-wrap {
    max-height: 160px;
}
.adbox-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}
.adbox-widget .adbox-image {
    height: 160px;
}
.adbox-timeline-inline .adbox-image-wrap {
    max-height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 8px;
}
.adbox-timeline-inline .adbox-image {
    height: 200px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* ---- Body teks ---- */
.adbox-body {
    padding: 10px 12px 6px 12px;
}
.adbox-timeline-inline .adbox-body {
    padding: 8px 0 4px 0;
}
.adbox-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.15s;
}
.adbox-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Footer ---- */
.adbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 10px 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
}
.adbox-timeline-inline .adbox-footer {
    padding: 8px 0 0 0;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}
.adbox-badge {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.adbox-badge i {
    font-size: 12px;
    color: var(--primary-color);
}
.adbox-promote {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.adbox-promote:hover {
    text-decoration: underline;
}