/**
 * Blueprint Dashboard - Architectural Floor Plan CSS
 *
 * Full-viewport canvas rendering of an interactive architectural blueprint.
 * Rooms map to admin sections. Supports dark/light themes.
 */

/* ── Reset & Base ─────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0a1628;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ── Canvas Container ─────────────────────────────────────────── */
.blueprint-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#blueprintCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: default;
}

#blueprintCanvas.room-hover {
    cursor: pointer;
}

/* ── Header Bar ───────────────────────────────────────────────── */
.bp-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 200, 255, 0.15);
}

.bp-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bp-header-left a {
    color: rgba(0, 200, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.bp-header-left a:hover {
    color: #00c8ff;
}

.bp-title {
    font-size: 15px;
    font-weight: 600;
    color: #00c8ff;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: "Courier New", Courier, monospace;
}

.bp-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bp-btn {
    background: rgba(0, 200, 255, 0.1);
    border: 1px solid rgba(0, 200, 255, 0.3);
    color: #00c8ff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: "Courier New", Courier, monospace;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bp-btn:hover {
    background: rgba(0, 200, 255, 0.2);
    border-color: rgba(0, 200, 255, 0.5);
}

.bp-btn-logout {
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(148, 163, 184, 0.1);
}

.bp-btn-logout:hover {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.5);
    background: rgba(148, 163, 184, 0.2);
}

/* ── Tooltip ──────────────────────────────────────────────────── */
.bp-tooltip {
    position: fixed;
    z-index: 20;
    pointer-events: none;
    background: rgba(10, 22, 40, 0.95);
    border: 1px solid rgba(0, 200, 255, 0.4);
    border-radius: 6px;
    padding: 10px 14px;
    color: #e2e8f0;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.15s;
    max-width: 240px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.bp-tooltip.visible {
    opacity: 1;
}

.bp-tooltip-title {
    font-weight: 700;
    color: #00c8ff;
    margin-bottom: 4px;
    font-size: 14px;
}

.bp-tooltip-section {
    color: rgba(0, 200, 255, 0.6);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Legend ────────────────────────────────────────────────────── */
.bp-legend {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 10;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 200, 255, 0.15);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    color: rgba(0, 200, 255, 0.6);
    max-width: 200px;
}

.bp-legend-title {
    color: #00c8ff;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.bp-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Dark Mode (default is already dark blueprint style) ──────── */
/* Light theme overrides */
[data-theme="light"] .bp-header,
[data-theme="light"] .bp-legend,
[data-theme="light"] .bp-tooltip {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(30, 58, 138, 0.2);
}

[data-theme="light"] .bp-header {
    border-bottom-color: rgba(30, 58, 138, 0.15);
}

[data-theme="light"] .bp-title {
    color: #1e3a8a;
}

[data-theme="light"] .bp-header-left a {
    color: rgba(30, 58, 138, 0.6);
}

[data-theme="light"] .bp-header-left a:hover {
    color: #1e3a8a;
}

[data-theme="light"] .bp-btn {
    background: rgba(30, 58, 138, 0.08);
    border-color: rgba(30, 58, 138, 0.2);
    color: #1e3a8a;
}

[data-theme="light"] .bp-btn:hover {
    background: rgba(30, 58, 138, 0.15);
    border-color: rgba(30, 58, 138, 0.4);
}

[data-theme="light"] .bp-btn-logout {
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.2);
    background: rgba(100, 116, 139, 0.08);
}

[data-theme="light"] .bp-tooltip-title {
    color: #1e3a8a;
}

[data-theme="light"] .bp-tooltip-section {
    color: rgba(30, 58, 138, 0.5);
}

[data-theme="light"] .bp-tooltip {
    color: #334155;
}

[data-theme="light"] .bp-legend-title {
    color: #1e3a8a;
}

[data-theme="light"] .bp-legend {
    color: rgba(30, 58, 138, 0.5);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bp-header {
        padding: 8px 12px;
    }

    .bp-title {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .bp-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .bp-legend {
        display: none;
    }
}

@media (max-width: 480px) {
    .bp-header-left a {
        display: none;
    }

    .bp-btn-logout span {
        display: none;
    }
}

/* ── Reduced Motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .bp-tooltip {
        transition: none;
    }
}
