﻿/*
 * ─────────────────────────────────────────────────────────────────────────────
 * 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\BannerAdModule.css
 *    Author: Robert Morgan
 *    Version: 1.4.0
 *    Created: 02/26/2026
 *    Modified: 03/04/2026
 *    Released: 00/00/0000
 *
 *    Description:
 *        Admin-only styles for the Banner Ad Module.
 *        Contains: ad editor panel, settings overlay, setting rows,
 *        toggle switch, select dropdown, slider, color input,
 *        help tooltips, and editor crop preview styles.
 *        v1.3.0 - Added ad editor panel styles: list view, search,
 *                 sort, edit form, image picker, date inputs,
 *                 delete confirmation, manage ads button.
 *        v1.4.0 - Customer-facing display styles extracted to
 *                 BannerAdDisplay.css. Added editor crop preview,
 *                 scale indicator, and reset button styles.
 *        v1.5.0 - Added collapsible panel header pattern for ad editor sections.
 *                 rmc-panel-header / rmc-panel-arrow mirror the LaunchCompass
 *                 contact-panel-header / contact-panel-arrow pattern but are
 *                 RMC-namespaced for use across all RCL consumers.
 *                 Panel header contains three elements: section title (left),
 *                 lock button (center), collapse arrow (right). *    MVVM Role: View Styling (Admin)
 *    Architecture: CSS | Mobile-First | Admin Panel
 * ─────────────────────────────────────────────────────────────────────────────
 */


/* ══════════════════════════════════════════════════════════════════════════
   AD EDITOR
   ══════════════════════════════════════════════════════════════════════════ */

.rmc-editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.rmc-editor-search {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
}

    .rmc-editor-search::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }

.rmc-editor-sort {
    min-width: 110px !important;
}

.rmc-editor-new-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed rgba(233, 69, 96, 0.5);
    border-radius: 8px;
    background: transparent;
    color: #e94560;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    margin-bottom: 12px;
}

    .rmc-editor-new-btn:active {
        background: rgba(233, 69, 96, 0.1);
    }

.rmc-editor-manage-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    margin-bottom: 10px;
}

    .rmc-editor-manage-btn:active {
        background: rgba(255, 255, 255, 0.2);
    }

.rmc-editor-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rmc-editor-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    cursor: pointer;
    touch-action: manipulation;
}

    .rmc-editor-list-item:active {
        background: rgba(255, 255, 255, 0.12);
    }

.rmc-editor-inactive {
    opacity: 0.45;
}

.rmc-editor-list-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rmc-editor-list-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rmc-editor-list-detail {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

.rmc-editor-list-arrow {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    margin-left: 8px;
}

.rmc-editor-empty {
    text-align: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

.rmc-editor-back-btn {
    display: inline-block;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    margin-bottom: 12px;
}

    .rmc-editor-back-btn:active {
        background: rgba(255, 255, 255, 0.15);
    }

.rmc-editor-readonly {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    font-family: monospace;
}

.rmc-editor-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

    .rmc-editor-field > label {
        font-size: 13px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.6);
    }

.rmc-editor-text {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

    .rmc-editor-text::placeholder {
        color: rgba(255, 255, 255, 0.3);
    }

.rmc-editor-text-short {
    flex: 1;
    min-width: 0;
}

.rmc-editor-date {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    color-scheme: dark;
}

.rmc-editor-image-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rmc-editor-browse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(233, 69, 96, 0.2);
    font-size: 20px;
    cursor: pointer;
    touch-action: manipulation;
    flex-shrink: 0;
}

    .rmc-editor-browse-btn:active {
        background: rgba(233, 69, 96, 0.4);
    }

.rmc-editor-preview {
    margin-top: 6px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.rmc-editor-preview-img {
    height: 48px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    padding: 4px;
}

.rmc-editor-preview-bg {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.rmc-editor-delete-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(233, 69, 96, 0.3);
}

.rmc-editor-delete-btn {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(233, 69, 96, 0.5);
    border-radius: 8px;
    background: transparent;
    color: #e94560;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}

    .rmc-editor-delete-btn:active {
        background: rgba(233, 69, 96, 0.15);
    }

.rmc-editor-confirm {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .rmc-editor-confirm > span {
        font-size: 14px;
        color: #e94560;
        font-weight: 600;
    }

.rmc-editor-confirm-yes {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #e94560;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.rmc-editor-confirm-no {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}


/* ── Editor Crop Preview ───────────────────────────────────────────────── */

.rmc-editor-crop-preview {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 8px;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

    .rmc-editor-crop-preview:active {
        cursor: grabbing;
    }

.rmc-editor-crop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.rmc-editor-crop-hint {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.rmc-editor-crop-scale {
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 6px;
    border-radius: 3px;
    pointer-events: none;
}

.rmc-editor-reset-btn {
    margin-top: 6px;
    padding: 4px 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

    .rmc-editor-reset-btn:active {
        color: #fff;
        border-color: rgba(255, 255, 255, 0.4);
    }


/* ══════════════════════════════════════════════════════════════════════════
   SETTINGS OVERLAY
   ══════════════════════════════════════════════════════════════════════════ */

.rmc-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rmc-fade-in-anim 0.2s ease-in forwards;
}

.rmc-settings-panel {
    width: 100%;
    height: 100%;
    max-width: 480px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
    color: #ffffff;
    overflow: hidden;
}

.rmc-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.rmc-settings-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.rmc-settings-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
}

    .rmc-settings-close:active {
        background: rgba(255, 255, 255, 0.2);
    }

.rmc-settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px 20px;
    -webkit-overflow-scrolling: touch;
}

.rmc-settings-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.rmc-settings-apply {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: #e94560;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
}

    .rmc-settings-apply:active {
        opacity: 0.85;
    }


/* ── Setting Rows ──────────────────────────────────────────────────── */

.rmc-setting-section {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #e94560;
    margin: 20px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(233, 69, 96, 0.3);
}

.rmc-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

    .rmc-setting-row > label {
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
        flex-shrink: 0;
    }

.rmc-setting-value {
    font-size: 12px;
    font-weight: 700;
    color: #e94560;
    margin-left: 4px;
}


/* ── Disabled State ────────────────────────────────────────────────── */

.rmc-setting-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.rmc-setting-enabled {
    opacity: 1;
    pointer-events: auto;
}


/* ── Toggle Switch ─────────────────────────────────────────────────── */

.rmc-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

    .rmc-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.rmc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 26px;
    transition: background 0.25s ease;
}

    .rmc-toggle-slider::before {
        content: '';
        position: absolute;
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background: #ffffff;
        border-radius: 50%;
        transition: transform 0.25s ease;
    }

.rmc-toggle input:checked + .rmc-toggle-slider {
    background: #e94560;
}

    .rmc-toggle input:checked + .rmc-toggle-slider::before {
        transform: translateX(22px);
    }


/* ── Select Dropdown ───────────────────────────────────────────────── */

.rmc-setting-select {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    min-width: 130px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

    .rmc-setting-select option {
        background: #1a1a2e;
        color: #ffffff;
    }


/* ── Slider ────────────────────────────────────────────────────────── */

.rmc-setting-slider {
    flex: 1;
    min-width: 100px;
    max-width: 180px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
}

    .rmc-setting-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #e94560;
        cursor: pointer;
        border: 2px solid #ffffff;
    }

    .rmc-setting-slider::-moz-range-thumb {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #e94560;
        cursor: pointer;
        border: 2px solid #ffffff;
    }


/* ── Color Input ───────────────────────────────────────────────────── */

.rmc-color-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .rmc-color-input input[type="color"] {
        width: 36px;
        height: 36px;
        border: 2px solid rgba(255, 255, 255, 0.2);
        border-radius: 6px;
        padding: 2px;
        background: transparent;
        cursor: pointer;
    }

.rmc-color-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.rmc-color-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.rmc-color-hex {
    font-size: 11px;
    font-family: monospace;
    color: rgba(255, 255, 255, 0.45);
}


/* ── Help Tooltips ──────────────────────────────────────────────────── */

.rmc-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(233, 69, 96, 0.3);
    color: #e94560;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    margin-left: 6px;
    flex-shrink: 0;
    vertical-align: middle;
}

    .rmc-help-icon:active {
        background: rgba(233, 69, 96, 0.5);
    }

.rmc-help-popup {
    background: #2a2a4a;
    border: 1px solid rgba(233, 69, 96, 0.4);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 4px 0 12px;
    animation: rmc-fade-in-anim 0.15s ease-in forwards;
}

.rmc-help-heading {
    font-size: 15px;
    font-weight: 700;
    color: #e94560;
    margin-bottom: 8px;
}

.rmc-help-body {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.rmc-help-dismiss {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
}

    .rmc-help-dismiss:active {
        background: rgba(255, 255, 255, 0.2);
    }


/* ── Tablet (600px+) ───────────────────────────────────────────────────── */

@media (min-width: 600px) {
    .rmc-settings-panel {
        height: auto;
        max-height: 90vh;
        border-radius: 12px;
    }
}

/* ── Collapsible Panel Header ──────────────────────────────────────────── */

.rmc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

    .rmc-panel-header:active {
        opacity: 0.75;
    }


/* ── Collapsible Panel Arrow ───────────────────────────────────────────── */

.rmc-panel-arrow {
    width: 18px;
    height: 18px;
    fill: #e94560;
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.2s ease;
}


/* ── Direction Button Group ────────────────────────────────────────────── */

.rmc-direction-group {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.rmc-direction-btn {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    white-space: nowrap;
    min-width: 40px;
    text-align: center;
}

    .rmc-direction-btn.active {
        background: #e94560;
        border-color: #e94560;
        color: #ffffff;
    }

    .rmc-direction-btn:active {
        opacity: 0.8;
    }


/* ── Gradient Hint Text ────────────────────────────────────────────────── */

.rmc-gradient-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
    margin: 2px 0 6px;
    padding-left: 2px;
}

    .rmc-gradient-hint.rmc-gradient-hint-warn {
        color: #ffc107;
    }