/* ===================================================
   AdMaster Pro — Frontend Styles
   =================================================== */

.admaster-ad {
    box-sizing: border-box;
    font-family: inherit;
    z-index: 99999;
}

/* Label "Publicidade" */
.admaster-label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #999;
    text-align: center;
    margin-bottom: 4px;
    line-height: 1;
}

/* Inner content */
.admaster-inner {
    overflow: hidden;
}
.admaster-inner img {
    display: block;
    width: 100%;
    height: auto;
}

/* Close button */
.admaster-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    border: 2px solid #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    transition: background .2s, transform .2s;
    padding: 0;
}
.admaster-close:hover {
    background: #d63638;
    transform: scale(1.1);
}

/* ===================================================
   1. CORNER — Canto Fixo
   =================================================== */
.admaster-corner {
    position: fixed;
    padding: 6px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,.22);
    animation: admasterSlideIn .4s ease;
    transition: transform .3s ease;
}
.admaster-corner:hover {
    transform: scale(1.02);
}
.admaster-pos-bottom-right { bottom: 20px; right: 20px; }
.admaster-pos-bottom-left  { bottom: 20px; left:  20px; }
.admaster-pos-top-right    { top:    80px; right: 20px; }
.admaster-pos-top-left     { top:    80px; left:  20px; }

/* ===================================================
   2. OVERLAY — Modal Central
   =================================================== */
.admaster-overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 99998;
    animation: admasterFadeIn .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admaster-overlay {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,.4);
    animation: admasterZoomIn .35s ease;
    max-width: 95vw;
}

/* ===================================================
   3. VINHETA — Tela Quase Cheia
   =================================================== */
.admaster-vignette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 99997;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: admasterFadeIn .5s ease;
}
.admaster-vignette {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    animation: admasterZoomIn .5s ease;
}
.admaster-vignette .admaster-label {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.6);
    z-index: 2;
}
.admaster-vignette .admaster-close {
    top: 8px;
    right: 8px;
}
.admaster-vignette .admaster-inner img {
    max-height: 90vh;
    width: auto;
    max-width: 90vw;
}

/* ===================================================
   4. ÂNCORA — Barra Fixa Inferior
   =================================================== */
.admaster-anchor-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99996;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f1f1f1;
    border-top: 1px solid #ddd;
    padding: 4px 40px;
    min-height: 80px;
    box-shadow: 0 -2px 10px rgba(0,0,0,.1);
    animation: admasterSlideUp .4s ease;
}
.admaster-anchor {
    position: relative;
    max-width: 100%;
    text-align: center;
}
.admaster-anchor .admaster-close {
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    top: -8px;
    right: -32px;
}
.admaster-anchor .admaster-inner {
    display: inline-block;
}

/* ===================================================
   5. INLINE — Dentro do Conteúdo
   =================================================== */
.admaster-inline {
    text-align: center;
    margin: 1.5em auto;
    position: relative;
}
.admaster-inline .admaster-inner {
    display: inline-block;
    max-width: 100%;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    padding: 4px;
    border-radius: 4px;
}

/* ===================================================
   Animações
   =================================================== */
@keyframes admasterFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes admasterZoomIn {
    from { opacity: 0; transform: scale(.88); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes admasterSlideIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes admasterSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Saída */
.admaster-hiding {
    animation: admasterFadeOut .3s ease forwards;
}
@keyframes admasterFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; pointer-events: none; }
}

/* Responsivo */
@media (max-width: 600px) {
    .admaster-corner {
        max-width: calc(100vw - 40px);
    }
    .admaster-anchor-wrapper {
        min-height: 60px;
        padding: 4px 36px;
    }
}
