﻿/* TowerCoverage error page — RF propagation + fiber mapping theme */

:root {
    --tc-accent: #247FBA;
    --tc-accent-hi: #38bdf8;
    --tc-fiber: #ffa837;
    --tc-fiber-hi: #ffc06a;
    --tc-fiber-glow: rgba(255, 168, 55, 0.55);
    --tc-rf-glow: rgba(56, 189, 248, 0.45);
    --tc-text: #e5f2ff;
    --tc-muted: rgba(210, 225, 245, 0.72);
    --tc-glass-bg: rgba(10, 18, 30, 0.58);
    --tc-glass-border: rgba(255, 255, 255, 0.12);
    --tc-glass-shadow: 0 22px 55px rgba(0, 0, 0, 0.42);
    --tc-glass-blur: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body.tc-error-page {
    min-height: 100%;
    margin: 0;
}

body.tc-error-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--tc-text);
    background:
        repeating-linear-gradient(-35deg, rgba(56, 189, 248, 0) 0 22px, rgba(56, 189, 248, 0.06) 22px 23px, rgba(56, 189, 248, 0) 23px 60px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 28px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px),
        radial-gradient(1100px circle at 15% 12%, rgba(56, 189, 248, 0.28), transparent 55%),
        radial-gradient(900px circle at 88% 22%, rgba(255, 168, 55, 0.16), transparent 58%),
        radial-gradient(700px circle at 50% 92%, rgba(37, 99, 235, 0.18), transparent 62%),
        linear-gradient(135deg, #030712 0%, #04122a 38%, #071f3e 100%);
    overflow-x: hidden;
}

.tc-error-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tc-error-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(90deg, rgba(36, 127, 181, 1) 0%, rgba(36, 140, 208, 1) 28%, rgba(29, 98, 153, 1) 65%, rgba(0, 0, 0, 1) 100%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.tc-error-logo {
    display: inline-block;
    width: 200px;
    height: 38px;
    background: url(/Images/TowerCoverage-Orange-500.png) no-repeat left center / contain;
}

.tc-error-toplink {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s ease, color 0.2s ease;
}

.tc-error-toplink:hover {
    color: #d4eeff;
    background: rgba(0, 0, 0, 0.34);
}

button.tc-error-toplink {
    cursor: pointer;
    font-family: inherit;
}

.tc-error-main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
    gap: clamp(18px, 3vw, 36px);
    align-items: center;
    padding: clamp(20px, 4vw, 48px);
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.tc-error-visual {
    position: relative;
    min-height: 360px;
    border-radius: 22px;
    border: 1px solid var(--tc-glass-border);
    background: rgba(8, 16, 28, 0.42);
    box-shadow: var(--tc-glass-shadow);
    overflow: hidden;
}

.tc-error-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 62%, rgba(56, 189, 248, 0.12), transparent 48%),
        radial-gradient(circle at 72% 38%, rgba(255, 168, 55, 0.1), transparent 42%);
    pointer-events: none;
}

.tc-error-visual svg {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
}

.tc-error-rf-ring {
    fill: none;
    stroke: rgba(56, 189, 248, 0.35);
    stroke-width: 1.5;
    transform-origin: 50% 58%;
    animation: tc-rf-pulse 4.2s ease-out infinite;
}

.tc-error-rf-ring:nth-child(2) { animation-delay: 0.7s; opacity: 0.75; }
.tc-error-rf-ring:nth-child(3) { animation-delay: 1.4s; opacity: 0.55; }
.tc-error-rf-ring:nth-child(4) { animation-delay: 2.1s; opacity: 0.35; }

@keyframes tc-rf-pulse {
    0% {
        transform: scale(0.55);
        opacity: 0.85;
        stroke: rgba(56, 189, 248, 0.55);
    }
    70% {
        opacity: 0.15;
        stroke: rgba(56, 189, 248, 0.12);
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
        stroke: rgba(56, 189, 248, 0);
    }
}

.tc-error-fiber-track {
    fill: none;
    stroke: rgba(255, 168, 55, 0.22);
    stroke-width: 5;
    stroke-linecap: round;
}

.tc-error-fiber-live {
    fill: none;
    stroke: url(#tcFiberGradient);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 14 220;
    animation: tc-fiber-flow 2.8s linear infinite;
    filter: drop-shadow(0 0 6px var(--tc-fiber-glow));
}

.tc-error-fiber-break {
    fill: none;
    stroke: rgba(255, 90, 90, 0.85);
    stroke-width: 2;
    stroke-dasharray: 4 6;
    animation: tc-break-blink 1.4s ease-in-out infinite;
}

@keyframes tc-fiber-flow {
    to { stroke-dashoffset: -234; }
}

@keyframes tc-break-blink {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.tc-error-node {
    fill: #0b1524;
    stroke: var(--tc-fiber);
    stroke-width: 2;
}

.tc-error-node--warn {
    stroke: #ff6b6b;
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.55));
}

.tc-error-tower {
    fill: rgba(229, 242, 255, 0.92);
}

.tc-error-label {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    fill: rgba(210, 225, 245, 0.55);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tc-error-hud {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.tc-error-hud-item {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    line-height: 1.35;
    color: var(--tc-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tc-error-hud-item strong {
    display: block;
    color: var(--tc-text);
    font-size: 0.72rem;
    margin-bottom: 2px;
}

.tc-error-hud-item--rf strong { color: var(--tc-accent-hi); }
.tc-error-hud-item--fiber strong { color: var(--tc-fiber-hi); }
.tc-error-hud-item--warn strong { color: #ff8a8a; }

.tc-error-panel {
    padding: clamp(22px, 3vw, 34px);
    border-radius: 22px;
    background: var(--tc-glass-bg);
    backdrop-filter: blur(var(--tc-glass-blur)) saturate(125%);
    -webkit-backdrop-filter: blur(var(--tc-glass-blur)) saturate(125%);
    border: 1px solid var(--tc-glass-border);
    box-shadow: var(--tc-glass-shadow);
}

.tc-error-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffd9a8;
    background: rgba(255, 168, 55, 0.12);
    border: 1px solid rgba(255, 168, 55, 0.28);
    margin-bottom: 16px;
}

.tc-error-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.8);
    animation: tc-break-blink 1.4s ease-in-out infinite;
}

.tc-error-panel h1 {
    margin: 0 0 12px;
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tc-error-panel p {
    margin: 0 0 14px;
    color: var(--tc-muted);
    line-height: 1.65;
    font-size: 0.98rem;
}

.tc-error-code-wrap {
    display: none;
    align-items: stretch;
    gap: 10px;
    margin: 18px 0 0;
}

.tc-error-code-wrap:not([hidden]) {
    display: flex;
}

.tc-error-code {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    color: var(--tc-accent-hi);
    letter-spacing: 0.04em;
}

.tc-error-code-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tc-muted);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.tc-error-code code {
    display: block;
    font-size: 1rem;
    color: var(--tc-accent-hi);
    word-break: break-all;
}

.tc-error-copy-btn {
    flex: 0 0 auto;
    align-self: stretch;
    min-width: 84px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(36, 127, 186, 0.18);
    color: var(--tc-text);
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tc-error-copy-btn:hover {
    background: rgba(36, 127, 186, 0.32);
    border-color: rgba(56, 189, 248, 0.45);
}

.tc-error-copy-btn.is-copied {
    background: rgba(20, 184, 166, 0.22);
    border-color: rgba(45, 212, 191, 0.45);
    color: #99f6e4;
}

.tc-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.tc-error-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tc-error-btn:hover {
    transform: translateY(-1px);
}

.tc-error-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #247FBA 0%, #1c6a9b 100%);
    box-shadow: 0 10px 24px rgba(36, 127, 186, 0.28);
    border-color: rgba(255, 255, 255, 0.12);
}

.tc-error-btn--primary:hover {
    background: linear-gradient(135deg, #2f90cf 0%, #247FBA 100%);
}

.tc-error-btn--secondary {
    color: var(--tc-text);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.tc-error-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tc-error-support {
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
}

.tc-error-support h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.tc-error-support-note,
.tc-error-support-alt {
    margin: 0 0 12px;
    color: var(--tc-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.tc-error-support-alt a {
    color: #7ccaf9;
    font-weight: 600;
    text-decoration: none;
}

.tc-error-support-alt a:hover {
    text-decoration: underline;
}

#zammad-feedback-form .zammad-form-control,
#zammad-feedback-form .form-control {
    background: rgba(10, 16, 27, 0.9);
    color: #e8f0ff;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

#zammad-feedback-form label {
    color: var(--tc-text);
}

#zammad-feedback-form button[type=submit] {
    background: var(--tc-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
}

.tc-error-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tc-error-tag {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(210, 225, 245, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.tc-error-tag--rf { border-color: rgba(56, 189, 248, 0.25); color: #9bdcff; }
.tc-error-tag--fiber { border-color: rgba(255, 168, 55, 0.25); color: #ffd9a8; }

.tc-error-footer {
    padding: 14px 20px 22px;
    text-align: center;
    color: rgba(210, 225, 245, 0.45);
    font-size: 0.78rem;
}

@media (max-width: 900px) {
    .tc-error-main {
        grid-template-columns: 1fr;
    }

    .tc-error-visual {
        min-height: 280px;
    }

    .tc-error-hud {
        grid-template-columns: 1fr;
    }

    .tc-error-code-wrap:not([hidden]) {
        flex-direction: column;
    }

    .tc-error-copy-btn {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tc-error-rf-ring,
    .tc-error-fiber-live,
    .tc-error-fiber-break,
    .tc-error-badge::before {
        animation: none;
    }
}
