﻿/*
 * ─────────────────────────────────────────────────────────────────────────────
 * RMC_BannerAdModule
 *    Copyright (c) 2026 Robert Morgan / RMC Software Solutions, LLC
 *    All rights reserved.
 *
 *    This software is proprietary and confidential.
 *    Unauthorized copying, modification, distribution, or use is strictly prohibited.
 *
 *    File: wwwroot\Styles\BannerAdDisplay.css
 *    Author: Robert Morgan
 *    Version: 1.1.0
 *    Created: 03/04/2026
 *    Modified: 03/04/2026
 *    Released: 00/00/0000
 *
 *    Description:
 *        Customer-facing display styles for the Banner Ad Module.
 *        Extracted from BannerAdModule.css v1.3.0.
 *        Contains: banner container, placeholder, ad display,
 *        background image element, overlay, link layout, text,
 *        CTA button, close/settings buttons, context menu,
 *        all transition animations, shimmer, and responsive
 *        breakpoints.
 *        v1.0.0 - Initial extraction from BannerAdModule.css.
 *                 Added .rmc-ad-bg-image for absolute-positioned
 *                 background image with object-fit cover.
 *                 Added desktop width constraint at 600px+.
 *        v1.1.0 - Overlay opacity reduced from 0.45 to 0.25.
 *                 Overlay is now opt-in per ad via AdModel.UseBackgroundOverlay.
 *                 The .rmc-ad-bg-overlay class is retained but only rendered
 *                 when the flag is true — no visual change to ads that
 *                 do not use it.
 *
 *    MVVM Role: View Styling (Display)
 *    Architecture: CSS | Mobile-First | Animation
 * ─────────────────────────────────────────────────────────────────────────────
 */


/* ── Container ─────────────────────────────────────────────────────────── */

.rmc-banner-container {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rmc-banner-top {
    top: 0;
}

.rmc-banner-bottom {
    bottom: 0;
}


/* ── Placeholder ───────────────────────────────────────────────────────── */

.rmc-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .rmc-placeholder::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient( 45deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60% );
        animation: rmc-shimmer 3s ease-in-out infinite;
    }

.rmc-placeholder-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.rmc-placeholder-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.rmc-placeholder-headline {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.rmc-placeholder-pitch {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rmc-placeholder-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
    transition: opacity 0.2s ease;
}

    .rmc-placeholder-cta:active {
        opacity: 0.8;
    }


/* ── Ad Display ────────────────────────────────────────────────────────── */

.rmc-ad-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* ── Background Image Element ──────────────────────────────────────────── */

.rmc-ad-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}


/* ── Background Image Overlay (opt-in per ad) ──────────────────────────── */

.rmc-ad-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}


/* ── Ad Link / Content Row ─────────────────────────────────────────────── */

.rmc-ad-link {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 16px;
    text-decoration: none;
    color: inherit;
    gap: 12px;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.rmc-ad-image {
    height: 60%;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

.rmc-ad-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.rmc-ad-headline {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rmc-ad-subtext {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rmc-ad-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}


/* ── Close Button ───────────────────────────────────────────────────── */

.rmc-close-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    z-index: 10;
    padding: 0;
}

    .rmc-close-btn:active {
        background: rgba(255, 255, 255, 0.3);
    }


/* ── Settings Button (S) ───────────────────────────────────────────── */

.rmc-settings-btn {
    position: absolute;
    top: 4px;
    right: 36px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    z-index: 10;
    padding: 0;
}

    .rmc-settings-btn:active {
        background: rgba(255, 255, 255, 0.3);
    }


/* ── Context Menu ───────────────────────────────────────────────────── */

.rmc-context-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: rmc-fade-in-anim 0.2s ease-in forwards;
}

.rmc-context-menu {
    display: flex;
    gap: 12px;
}

.rmc-context-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}

.rmc-context-disable {
    background: #e94560;
    color: #ffffff;
}

.rmc-context-cancel {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}


/* ── Fade Transitions ──────────────────────────────────────────────────── */

.rmc-fade-in {
    animation: rmc-fade-in-anim 0.5s ease-in forwards;
}

.rmc-fade-out {
    animation: rmc-fade-out-anim 0.5s ease-out forwards;
}

@keyframes rmc-fade-in-anim {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes rmc-fade-out-anim {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}


/* ── Slide Transitions ─────────────────────────────────────────────────── */

.rmc-slide-in-left {
    animation: rmc-slide-in-left-anim 0.5s ease-out forwards;
}

.rmc-slide-out-left {
    animation: rmc-slide-out-left-anim 0.5s ease-in forwards;
}

.rmc-slide-in-right {
    animation: rmc-slide-in-right-anim 0.5s ease-out forwards;
}

.rmc-slide-out-right {
    animation: rmc-slide-out-right-anim 0.5s ease-in forwards;
}

.rmc-slide-in-up {
    animation: rmc-slide-in-up-anim 0.5s ease-out forwards;
}

.rmc-slide-out-up {
    animation: rmc-slide-out-up-anim 0.5s ease-in forwards;
}

.rmc-slide-in-down {
    animation: rmc-slide-in-down-anim 0.5s ease-out forwards;
}

.rmc-slide-out-down {
    animation: rmc-slide-out-down-anim 0.5s ease-in forwards;
}

@keyframes rmc-slide-in-left-anim {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes rmc-slide-out-left-anim {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes rmc-slide-in-right-anim {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes rmc-slide-out-right-anim {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}

@keyframes rmc-slide-in-up-anim {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes rmc-slide-out-up-anim {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-100%);
    }
}

@keyframes rmc-slide-in-down-anim {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes rmc-slide-out-down-anim {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}


/* ── Shimmer Animation ─────────────────────────────────────────────────── */

@keyframes rmc-shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}


/* ── Tablet / Desktop (600px+) ─────────────────────────────────────────── */

@media (min-width: 600px) {
    .rmc-placeholder-headline {
        font-size: 18px;
    }

    .rmc-placeholder-pitch {
        font-size: 14px;
    }

    .rmc-placeholder-cta {
        padding: 10px 20px;
        font-size: 13px;
    }

    .rmc-ad-headline {
        font-size: 16px;
    }

    .rmc-ad-subtext {
        font-size: 12px;
    }

    .rmc-ad-image {
        max-width: 120px;
    }

    .rmc-banner-container {
        max-width: 480px;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        border-radius: 6px;
        top: 4px;
    }

    .rmc-banner-bottom {
        top: auto;
        bottom: 4px;
    }
}
