/* ==========================================================================
   AMG Popups — Frontend Styles
   ========================================================================== */

/* Popup Container */
.apc-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
}

.apc-popup.apc-active {
    display: block;
}

/* Overlay */
.apc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

/* Content Box */
.apc-content {
    position: absolute;
    z-index: 2;
    border-radius: 6px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Close Button */
.apc-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    opacity: 0.7;
    z-index: 3;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apc-close:hover {
    opacity: 1;
}

/* Body */
.apc-body {
    position: relative;
}

.apc-body img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Positions
   ========================================================================== */

/* Center */
.apc-pos-center .apc-content {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Top Left */
.apc-pos-top_left .apc-content {
    top: 40px;
    left: 40px;
    transform: none;
}

/* Top Right */
.apc-pos-top_right .apc-content {
    top: 40px;
    right: 40px;
    left: auto;
    transform: none;
}

/* Bottom Left */
.apc-pos-bottom_left .apc-content {
    bottom: 40px;
    left: 40px;
    top: auto;
    transform: none;
}

/* Bottom Right */
.apc-pos-bottom_right .apc-content {
    bottom: 40px;
    right: 40px;
    left: auto;
    top: auto;
    transform: none;
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Fade */
.apc-anim-fade .apc-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.apc-anim-fade.apc-active .apc-content {
    opacity: 1;
}

.apc-anim-fade .apc-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.apc-anim-fade.apc-active .apc-overlay {
    opacity: 1;
}

/* Slide from Top */
.apc-anim-slide-top .apc-content {
    transform: translate(-50%, -150%);
    transition: transform 0.4s ease;
}

.apc-anim-slide-top.apc-active .apc-content {
    transform: translate(-50%, -50%);
}

.apc-anim-slide-top.apc-pos-top_left .apc-content {
    transform: translateY(-150%);
}
.apc-anim-slide-top.apc-pos-top_left.apc-active .apc-content {
    transform: translateY(0);
}

.apc-anim-slide-top.apc-pos-top_right .apc-content {
    transform: translateY(-150%);
}
.apc-anim-slide-top.apc-pos-top_right.apc-active .apc-content {
    transform: translateY(0);
}

.apc-anim-slide-top.apc-pos-bottom_left .apc-content,
.apc-anim-slide-top.apc-pos-bottom_right .apc-content {
    transform: translateY(-200%);
}
.apc-anim-slide-top.apc-pos-bottom_left.apc-active .apc-content,
.apc-anim-slide-top.apc-pos-bottom_right.apc-active .apc-content {
    transform: translateY(0);
}

/* Slide from Bottom */
.apc-anim-slide-bottom .apc-content {
    transform: translate(-50%, 150%);
    transition: transform 0.4s ease;
}

.apc-anim-slide-bottom.apc-active .apc-content {
    transform: translate(-50%, -50%);
}

.apc-anim-slide-bottom.apc-pos-top_left .apc-content,
.apc-anim-slide-bottom.apc-pos-top_right .apc-content,
.apc-anim-slide-bottom.apc-pos-bottom_left .apc-content,
.apc-anim-slide-bottom.apc-pos-bottom_right .apc-content {
    transform: translateY(200%);
}
.apc-anim-slide-bottom.apc-pos-top_left.apc-active .apc-content,
.apc-anim-slide-bottom.apc-pos-top_right.apc-active .apc-content,
.apc-anim-slide-bottom.apc-pos-bottom_left.apc-active .apc-content,
.apc-anim-slide-bottom.apc-pos-bottom_right.apc-active .apc-content {
    transform: translateY(0);
}

/* Slide from Left */
.apc-anim-slide-left .apc-content {
    transform: translate(-150%, -50%);
    transition: transform 0.4s ease;
}

.apc-anim-slide-left.apc-active .apc-content {
    transform: translate(-50%, -50%);
}

.apc-anim-slide-left.apc-pos-top_left .apc-content,
.apc-anim-slide-left.apc-pos-bottom_left .apc-content {
    transform: translateX(-150%);
}
.apc-anim-slide-left.apc-pos-top_left.apc-active .apc-content,
.apc-anim-slide-left.apc-pos-bottom_left.apc-active .apc-content {
    transform: translateX(0);
}

.apc-anim-slide-left.apc-pos-top_right .apc-content,
.apc-anim-slide-left.apc-pos-bottom_right .apc-content {
    transform: translateX(-200%);
}
.apc-anim-slide-left.apc-pos-top_right.apc-active .apc-content,
.apc-anim-slide-left.apc-pos-bottom_right.apc-active .apc-content {
    transform: translateX(0);
}

/* Slide from Right */
.apc-anim-slide-right .apc-content {
    transform: translate(150%, -50%);
    transition: transform 0.4s ease;
}

.apc-anim-slide-right.apc-active .apc-content {
    transform: translate(-50%, -50%);
}

.apc-anim-slide-right.apc-pos-top_left .apc-content,
.apc-anim-slide-right.apc-pos-bottom_left .apc-content {
    transform: translateX(200%);
}
.apc-anim-slide-right.apc-pos-top_left.apc-active .apc-content,
.apc-anim-slide-right.apc-pos-bottom_left.apc-active .apc-content {
    transform: translateX(0);
}

.apc-anim-slide-right.apc-pos-top_right .apc-content,
.apc-anim-slide-right.apc-pos-bottom_right .apc-content {
    transform: translateX(150%);
}
.apc-anim-slide-right.apc-pos-top_right.apc-active .apc-content,
.apc-anim-slide-right.apc-pos-bottom_right.apc-active .apc-content {
    transform: translateX(0);
}

/* ==========================================================================
   Sticky Bar
   ========================================================================== */

.apc-stickybar {
    position: fixed;
    left: 0;
    width: 100%;
    z-index: 99998;
    display: none;
}

.apc-stickybar.apc-active {
    display: block;
}

.apc-bar-top {
    top: 0;
}

.apc-bar-bottom {
    bottom: 0;
}

.apc-bar-inner {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.apc-stickybar .apc-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    z-index: 3;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apc-stickybar .apc-close:hover {
    opacity: 1;
}

.apc-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding-right: 40px;
}

.apc-bar-content img {
    max-width: 100%;
    height: auto;
}

/* Bar Logo */
.apc-bar-logo {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    max-height: 40px;
    width: auto;
}

.apc-bar-logo-left {
    left: 16px;
}

.apc-bar-logo-right {
    right: 44px;
}

/* Sticky Bar Animations */

/* Fade */
.apc-bar-anim-fade .apc-bar-inner {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.apc-bar-anim-fade.apc-active .apc-bar-inner {
    opacity: 1;
}

/* Slide */
.apc-bar-top.apc-bar-anim-slide .apc-bar-inner {
    transform: translateY(-100%);
    transition: transform 0.4s ease;
}

.apc-bar-top.apc-bar-anim-slide.apc-active .apc-bar-inner {
    transform: translateY(0);
}

.apc-bar-bottom.apc-bar-anim-slide .apc-bar-inner {
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.apc-bar-bottom.apc-bar-anim-slide.apc-active .apc-bar-inner {
    transform: translateY(0);
}

/* Spread (width 0 → 100%) */
.apc-bar-anim-spread {
    overflow: hidden;
}

.apc-bar-anim-spread .apc-bar-inner {
    width: 0;
    margin: 0 auto;
    overflow: hidden;
    transition: width 0.5s ease;
}

.apc-bar-anim-spread.apc-active .apc-bar-inner {
    width: 100%;
}

.apc-bar-anim-spread .apc-bar-content {
    opacity: 0;
    transition: opacity 0.3s ease 0.4s;
}

.apc-bar-anim-spread.apc-active .apc-bar-content {
    opacity: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .apc-content {
        width: 95% !important;
        max-width: 95% !important;
        left: 2.5% !important;
        right: auto !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
    }

    .apc-anim-slide-top .apc-content,
    .apc-anim-slide-bottom .apc-content,
    .apc-anim-slide-left .apc-content,
    .apc-anim-slide-right .apc-content {
        transform: translateY(-200%) !important;
    }

    .apc-popup.apc-active .apc-content {
        transform: translateY(-50%) !important;
    }
}
