﻿/* wwwroot/css/noah-widget.css */

.noah-widget {
    position: fixed;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    z-index: 40;
    pointer-events: none;
}

/* The draggable “surface” (button when closed; panel when open) */
.noah-fab,
.noah-panel {
    pointer-events: auto;
}

/* =============== */
/* PREMIUM FAB      */
/* =============== */

.noah-fab {
    position: fixed;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.55);
    background: radial-gradient(120px 120px at 30% 25%, rgba(255,255,255,0.55), rgba(255,255,255,0) 60%), linear-gradient(135deg, #d946ef 0%, #a855f7 35%, #6366f1 70%, #06b6d4 100%);
    box-shadow: 0 18px 45px rgba(15,23,42,0.18), 0 0 0 6px rgba(217,70,239,0.10), 0 0 0 1px rgba(255,255,255,0.20) inset;
    backdrop-filter: blur(14px);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
    overflow: hidden;
}

    .noah-fab::before {
        content: "";
        position: absolute;
        inset: -2px;
        background: radial-gradient(120px 120px at 20% 15%, rgba(255,255,255,0.45), rgba(255,255,255,0) 60%);
        opacity: 0.9;
        pointer-events: none;
    }

    .noah-fab:hover {
        transform: translateY(-1px);
        filter: saturate(1.08);
        box-shadow: 0 22px 58px rgba(15,23,42,0.22), 0 0 0 7px rgba(217,70,239,0.13), 0 0 18px rgba(217,70,239,0.22), 0 0 0 1px rgba(255,255,255,0.22) inset;
    }

    .noah-fab:active {
        transform: translateY(0);
    }

    .noah-fab.noah-dragging {
        cursor: move;
        transition: none;
    }

/* Text always fits and scales */
.noah-fab-inner {
    position: relative;
    height: 100%;
    width: 100%;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 10px;
    text-align: center;
}

.noah-fab-text {
    display: block;
    width: 100%;
    line-height: 1;
    color: rgba(255,255,255,0.96);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 8px 20px rgba(15,23,42,0.25);
    font-size: clamp(10px, 1.25vw, 12px);
}

.noah-fab-text-strong {
    letter-spacing: 0.14em;
    font-weight: 900;
    font-size: clamp(12px, 1.65vw, 15px);
}

@media (max-width: 640px) {
    .noah-fab {
        width: 66px;
        height: 66px;
    }

    .noah-fab-text {
        font-size: 11px;
    }

    .noah-fab-text-strong {
        font-size: 13px;
    }
}

/* =============== */
/* PANEL + RESIZE   */
/* =============== */

.noah-panel {
    position: fixed;
    width: min(460px, calc(100vw - 24px));
    height: min(640px, calc(100vh - 24px));
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    box-shadow: 0 22px 60px rgba(15,23,42,0.22);
    overflow: hidden;
    touch-action: none;
    transition: box-shadow 140ms ease;
}

    .noah-panel.noah-dragging {
        transition: none;
    }

.noah-panel-topbar {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-bottom: 1px solid rgba(15,23,42,0.08);
    user-select: none;
    -webkit-user-select: none;
}

.noah-panel.noah-dragging .noah-panel-topbar {
    cursor: move;
}

.noah-panel-title {
    font-weight: 900;
    font-size: 13px;
    color: rgba(15,23,42,0.88);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.noah-panel-subtitle {
    font-weight: 600;
    font-size: 11px;
    color: rgba(15,23,42,0.45);
}

.noah-panel-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,0.10);
    background: rgba(255,255,255,0.70);
    cursor: pointer;
}

.noah-panel-body {
    height: calc(100% - 52px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
}

/* Make sure embedded partial can receive typing/clicks */
.noah-panel * {
    pointer-events: auto;
}

/* Resize handle (bottom-right) */
.noah-resize-handle {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(217,70,239,0.18), rgba(99,102,241,0.10));
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: 0 10px 25px rgba(15,23,42,0.10);
    cursor: nwse-resize;
}

    /* optional little “grip” lines */
    .noah-resize-handle::after {
        content: "";
        position: absolute;
        inset: 4px;
        background: linear-gradient(135deg, rgba(255,255,255,0.75), rgba(255,255,255,0) 70%);
        border-radius: 5px;
        opacity: 0.55;
        pointer-events: none;
    }
