/* ===================================
   Ad Banner Module - Isolated Styles
   All classes prefixed with .ad-banner-
   =================================== */

.ad-banner-box-link {
    text-decoration: none;
    display: block;
    position: fixed;
    bottom: 20px; /* Default fallback if JS doesn't run */
    left: 20px;
    z-index: 99999;
}

.ad-banner-box {
    width: auto;
    max-width: 320px;
    background: #f8e4aa;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    font-family: 'DM Serif Display', serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* When box is inside a link wrapper */
.ad-banner-box-link .ad-banner-box {
    position: relative;
    cursor: pointer;
}

/* When box is standalone (no link) */
.ad-banner-box:not(.ad-banner-box-link .ad-banner-box) {
    position: fixed;
    bottom: 20px; /* Default fallback if JS doesn't run */
    left: 20px;
    z-index: 99999;
}

/* Mobile Icon - Hidden by default */
.ad-banner-mobile-icon {
    display: none;
    position: fixed;
    bottom: 0px; /* Same as floating-phone */
    left: 5px; /* Left side */
    z-index: 99999;
    width: 125px; /* Same as floating-phone */
    height: 125px; /* Same as floating-phone */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ad-banner-mobile-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.ad-banner-mobile-icon:hover {
    transform: scale(1.1);
}

.ad-banner-box-link:hover .ad-banner-box {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.ad-banner-content {
    display: flex;
    align-items: center;
    padding: 7px;
}

.ad-banner-image {
    flex-shrink: 0;
    width: 107px;
    height: 80px;
    margin-right: 16px;
}

.ad-banner-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.ad-banner-text {
    flex: 1;
    min-width: 0;
    max-width: 90px;
    text-align: center;
}

.ad-banner-title {
    font-size: 13.3px;
    /* font-weight: 700; */
    color: #3f6870;
    margin: 0 0 4px 0;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.ad-banner-subtitle {
    font-size: 9.7px;
    color: #3f6870;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Tablet and smaller desktop */
@media (max-width: 768px) {
    .ad-banner-box-link,
    .ad-banner-box:not(.ad-banner-box-link .ad-banner-box) {
        left: 15px;
    }

    .ad-banner-box {
        max-width: 280px;
    }

    .ad-banner-image {
        width: 70px;
        height: 70px;
        margin-right: 12px;
    }

    .ad-banner-title {
        font-size: 10px;
    }

    .ad-banner-subtitle {
        font-size: 7px;
    }
}

/* Mobile devices */
@media (max-width: 480px) {
    /* Hide desktop box */
    .ad-banner-desktop {
        display: none !important;
    }

    /* Show mobile icon */
    .ad-banner-mobile-icon {
        display: block;
    }
}
