/* PeepSo Promoted Posts - Frontend Styles */

/* =========================================
   Base styles
   ========================================= */
.ppp-promoted {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 16px 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Badge styles */
.ppp-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.3px;
}
.ppp-badge--info {
    background: #e6f1fb;
    color: #0c447c;
}
.ppp-badge--amber {
    background: #faeeda;
    color: #854f0b;
}
.ppp-badge--light {
    background: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.85);
    position: absolute;
    top: 12px;
    right: 48px;
}

/* Dismiss button */
.ppp-dismiss {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}
.ppp-dismiss:hover {
    background: #f0f0f0;
    color: #333;
}
.ppp-dismiss--light {
    color: rgba(255,255,255,0.6);
}
.ppp-dismiss--light:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* CTA button */
.ppp-cta {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-align: center;
}
.ppp-cta:hover {
    opacity: 0.9;
    text-decoration: none;
}
.ppp-cta:active {
    transform: scale(0.98);
}
.ppp-cta--primary {
    background: #2271b1;
    color: #fff;
}
.ppp-cta--full {
    display: block;
    background: #2271b1;
    color: #fff;
}
.ppp-cta--light {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}
.ppp-cta--light:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* Avatar */
.ppp-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ppp-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e6f1fb;
    color: #0c447c;
    font-weight: 600;
    font-size: 16px;
}

/* =========================================
   Card Template
   ========================================= */
.ppp-promoted--card .ppp-promoted__header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ppp-promoted--card .ppp-dismiss {
    position: static;
}

.ppp-card__cover {
    background: linear-gradient(135deg, #e6f1fb 0%, #eeedfe 100%);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}
.ppp-card__cover .ppp-avatar {
    width: 72px;
    height: 72px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 22px;
}

.ppp-card__body {
    padding: 16px;
    text-align: center;
}
.ppp-card__title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1d2327;
}
.ppp-card__desc {
    font-size: 13px;
    color: #646970;
    margin: 0 0 14px;
    line-height: 1.5;
}

/* =========================================
   Native Template (PeepSo-style)
   ========================================= */
.ppp-promoted--native {
    padding: 16px;
}
.ppp-native__top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.ppp-promoted--native .ppp-dismiss {
    position: static;
    flex-shrink: 0;
    margin-left: auto;
}
.ppp-native__avatar .ppp-avatar {
    width: 44px;
    height: 44px;
    font-size: 14px;
}
.ppp-native__info {
    flex: 1;
    min-width: 0;
}
.ppp-native__name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ppp-native__name-row strong {
    font-size: 15px;
    color: #1d2327;
}
.ppp-native__meta {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 2px;
}
.ppp-native__desc {
    font-size: 14px;
    color: #333;
    margin: 0 0 12px;
    line-height: 1.5;
}
.ppp-native__image {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}
.ppp-native__image img {
    width: 100%;
    height: auto;
    display: block;
}
.ppp-native__actions {
    display: flex;
    gap: 8px;
}

/* =========================================
   Banner Template
   ========================================= */
.ppp-promoted--banner {
    padding: 24px 20px;
    color: #fff;
    border: none;
}
.ppp-banner__content {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 16px;
}
.ppp-banner__content .ppp-avatar {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 10px;
    font-size: 18px;
}
.ppp-banner__content .ppp-avatar img {
    border-radius: 10px;
}
.ppp-banner__text {
    flex: 1;
}
.ppp-banner__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #fff;
}
.ppp-banner__desc {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    margin: 0;
    line-height: 1.5;
}
.ppp-banner__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ppp-banner__url {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

/* =========================================
   Image Ad Template
   ========================================= */
.ppp-promoted--native[data-ppp-type="image_ad"] .ppp-native__image {
    margin-bottom: 0;
}
.ppp-promoted--native[data-ppp-type="image_ad"] .ppp-native__image img {
    border-radius: 0;
}

/* Image ad with no link - not clickable */
.ppp-image-ad-nolink {
    cursor: default;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 600px) {
    .ppp-card__cover {
        height: 90px;
    }
    .ppp-card__cover .ppp-avatar {
        width: 56px;
        height: 56px;
    }
    .ppp-banner__content {
        flex-direction: column;
        align-items: flex-start;
    }
    .ppp-banner__footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .ppp-cta--full, .ppp-cta--primary {
        font-size: 13px;
        padding: 7px 18px;
    }
}
