.dooble-ad-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    margin: 15px 0;
    position: relative;
    overflow: visible;    width: 100%;
}

.dooble-ad-placeholder[data-size="leader"] { min-height: 90px; }
.dooble-ad-placeholder[data-size="rect"]   { min-height: 250px; }
.dooble-ad-placeholder[data-size="large"]  { min-height: 280px; }
.dooble-ad-placeholder[data-size="sky"]    { min-height: 600px; }
.dooble-ad-placeholder[data-size="mobile"] { min-height: 50px; }

.dooble-ad-placeholder.is-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    margin: 0;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}
.dooble-ad-placeholder.is-sticky.loaded {
    transform: translateY(0);
}

.dooble-ad-placeholder.is-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    pointer-events: none;}
.dooble-ad-placeholder.is-modal.loaded {
    opacity: 1;
    pointer-events: auto;
}
.dooble-ad-placeholder.is-modal .dooble-ad-wrapper {
    background: #fff;
    padding: 15px;    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.dooble-ad-placeholder.is-interstitial {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;    z-index: 999999;    flex-direction: column;
    opacity: 1;
    pointer-events: auto;
    animation: dooble-interstitial-fade-in 0.25s ease-out;
    right: 0;
    bottom: 0;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: inherit;
    padding: 50px;
}

@keyframes dooble-interstitial-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.dooble-interstitial-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 10px 24px;
    background: #fff;
    width: 1188px;
    max-width: 100%;
}

.dooble-interstitial-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.dooble-interstitial-logo a {
    display: flex;
    align-items: center;
}

.dooble-interstitial-logo img {
    display: block;
    max-height: 42px;
    width: auto;
}

.dooble-interstitial-logo .dooble-interstitial-sitename {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
}

.dooble-interstitial-message {
    flex: 1 1 auto;
    text-align: center;
    font-size: 15px;
    line-height: 1.4;
    color: #444;
    padding: 0 12px;
}

.dooble-interstitial-skip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8e8e8;
    color: #8a8a8a;
    border: none;
    border-radius: 22px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.dooble-interstitial-skip:disabled {
    cursor: not-allowed;
}

.dooble-interstitial-skip .dooble-interstitial-skip-timer {
    font-variant-numeric: tabular-nums;
}

.dooble-interstitial-skip.is-ready {
    color: #1a1a1a;
    background: none;
    cursor: pointer;
}

.dooble-interstitial-body {
    flex: 1 1 auto;
    position: relative;
    display: flex;
    align-items: self-start;
    justify-content: center;
    padding: 0 24px;
    overflow: auto;
    width: 1188px;
    margin: 0 auto;
}

.dooble-interstitial-body .dooble-ad-wrapper {
    max-width: 100%;
    max-height: 100%;
    opacity: 1;}

.dooble-interstitial-body img {
    display: block;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-width: min(100%, 1140px);
    max-height: min(calc(100vh - 130px), 600px);
}

.dooble-ad-placeholder.is-modal .dooble-ad-wrapper img,
.dooble-ad-placeholder.is-modal .dooble-ad-wrapper video {
    max-width: 1140px;
    max-height: 600px;
}

@media (max-width: 767px) {
    .dooble-interstitial-header {
        min-height: 52px;
        padding: 8px 14px;
        gap: 8px;
    }
    .dooble-interstitial-logo img { max-height: 28px; }
    .dooble-interstitial-logo .dooble-interstitial-sitename { font-size: 14px; }
    .dooble-interstitial-message {
        font-size: 12px;
        padding: 0 6px;
    }
    .dooble-interstitial-skip {
        padding: 7px 12px;
        font-size: 12px;
        border-radius: 18px;
    }
    .dooble-interstitial-body { padding: 12px; }
    .dooble-interstitial-body img {
        max-width: min(100%, 500px);
        max-height: min(calc(100vh - 100px), 670px);
    }
    .dooble-ad-placeholder.is-modal .dooble-ad-wrapper img,
    .dooble-ad-placeholder.is-modal .dooble-ad-wrapper video {
        max-width: 500px;
        max-height: 670px;
    }
}

html.dooble-lock-scroll,
html.dooble-lock-scroll body {
    overflow: hidden !important;
}

.dooble-close {
    position: absolute;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
}

.dooble-close.pos-top-right { top: 10px; right: 10px; }
.dooble-close.pos-top-left  { top: 10px; left: 10px; }
.dooble-close.pos-outside   { top: -15px; right: -15px; }

.dooble-loader {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.dooble-ad-placeholder.loaded .dooble-loader {
    display: none;
}

.dooble-ad-wrapper {
    opacity: 0;
    transition: opacity 0.5s ease;
}
.dooble-ad-placeholder.loaded .dooble-ad-wrapper {
    opacity: 1;
}

.dooble-ad-fallback {
    background: #f1f1f1;
    border: 1px dashed #ccc;
    padding: 15px;
    text-align: center;
    font-size: 11px;
}

@media (hover: hover) and (pointer: fine) {
    .dooble-interstitial-skip.is-ready:hover {
        transform: scale(1.04);
    }
}
