/**
 * chairueng Ads Frontend Stylesheet
 */

.chairueng-ad-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto;
    text-align: center;
    max-width: 100%;
    clear: both;
}

.chairueng-ad-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.25rem;
}

.chairueng-ad-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a1a1aa;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    user-select: none;
}

.chairueng-ad-link {
    display: inline-block;
    max-width: 100%;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chairueng-ad-link:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.chairueng-ad-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.chairueng-ad-custom-content {
    max-width: 100%;
    overflow: hidden;
}

/* Placement Modifiers */
.chairueng-ad-placement-header {
    margin: 0.75rem auto;
}

.chairueng-ad-placement-before_player,
.chairueng-ad-placement-after_player {
    margin: 1.25rem auto;
    width: 100%;
}

.chairueng-ad-placement-sidebar {
    margin: 1rem 0;
    width: 100%;
}

/* Popup Overlay */
.chairueng-ad-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: chairuengFadeIn 0.3s ease-out forwards;
}

@keyframes chairuengFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.chairueng-ad-popup-dialog {
    position: relative;
    max-width: 600px;
    width: 100%;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: chairuengScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chairuengScaleIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.chairueng-ad-popup-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #09090b;
    border-bottom: 1px solid #27272a;
}

.chairueng-ad-popup-close {
    background: transparent;
    border: none;
    color: #a1a1aa;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.15s ease;
}

.chairueng-ad-popup-close:hover {
    color: #ef4444;
}

.chairueng-ad-popup-body {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chairueng-ad-popup-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

