/* ==========================================
   VBSystem - Blazor Reconnection Overlay
   
   File: wwwroot/css/reconnection.css
   ========================================== */

/* ---- Hide default Blazor error UI ---- */
#blazor-error-ui {
    display: none !important;
}

/* ---- Base: hide all states ---- */
.components-reconnect-hide > .reconnect-overlay {
    display: none !important;
}

/* ---- Show correct state ---- */
.components-reconnect-show > .reconnect-overlay.state-reconnecting {
    display: flex !important;
}
.components-reconnect-failed > .reconnect-overlay.state-failed {
    display: flex !important;
}
.components-reconnect-rejected > .reconnect-overlay.state-rejected {
    display: flex !important;
}

/* ---- Full-screen backdrop ---- */
.reconnect-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background-color: rgba(15, 23, 35, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    animation: reconnect-fadeIn 0.2s ease-out;
}

/* ---- Dialog card ---- */
.reconnect-dialog {
    background: #fff;
    border-radius: 12px;
    width: 380px;
    max-width: 90vw;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2), 0 2px 12px rgba(0,0,0,0.08);
    animation: reconnect-slideUp 0.25s ease-out;
    overflow: hidden;
}

.reconnect-dialog-content {
    text-align: center;
    padding: 36px 32px 28px;
}

/* ---- Top accent bar ---- */
.reconnect-accent {
    height: 3px;
    background: linear-gradient(90deg, #1a3a5c, #2d6da8, #1a3a5c);
}
.reconnect-accent.animated {
    background-size: 200% 100%;
    animation: reconnect-shimmer 1.5s ease-in-out infinite;
}
.reconnect-accent.warning {
    background: linear-gradient(90deg, #e8870e, #f0ad4e, #e8870e);
}

/* ---- Icon circles ---- */
.reconnect-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reconnect-icon-circle.warning {
    background: linear-gradient(135deg, #fff4e5 0%, #ffe8cc 100%);
    border: 2px solid #ffd599;
}
.reconnect-icon-circle.info {
    background: linear-gradient(135deg, #eef4ff 0%, #dce8f8 100%);
    border: 2px solid #b8d0ee;
}

/* ---- Typography ---- */
.reconnect-title {
    margin: 18px 0 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a2a3a;
    letter-spacing: -0.01em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.reconnect-message {
    margin: 8px auto 0;
    font-size: 13px;
    color: #6b7a8d;
    line-height: 1.5;
    max-width: 280px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.reconnect-note {
    margin-top: 14px;
    font-size: 11px;
    color: #aab4c0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---- Status indicator ---- */
.reconnect-status {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.reconnect-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f0ad4e;
    animation: reconnect-pulse 1.5s ease-in-out infinite;
}
.reconnect-status-text {
    font-size: 11px;
    color: #999;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---- Buttons ---- */
.reconnect-btn-primary {
    margin-top: 22px;
    padding: 10px 32px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #1a3a5c 0%, #2d6da8 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(26,58,92,0.2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.reconnect-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,58,92,0.3);
}
.reconnect-btn-primary:active {
    transform: translateY(0);
}

.reconnect-btn-secondary {
    margin-top: 18px;
    padding: 10px 32px;
    font-size: 13px;
    font-weight: 600;
    color: #2d6da8;
    background: transparent;
    border: 1.5px solid #2d6da8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.reconnect-btn-secondary:hover {
    background: #f0f6fc;
}

/* ---- Spinner ---- */
.reconnect-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto;
    animation: reconnect-spin 1s linear infinite;
}

/* ---- Countdown ring ---- */
.reconnect-countdown {
    position: relative;
    width: 48px;
    height: 48px;
    margin: 20px auto 0;
}
.reconnect-countdown svg {
    transform: rotate(-90deg);
}
.reconnect-countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
    font-weight: 700;
    color: #1a3a5c;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---- Animations ---- */
@keyframes reconnect-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes reconnect-slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes reconnect-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes reconnect-spin {
    to { transform: rotate(360deg); }
}
@keyframes reconnect-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ---- Debug test panel ---- */
.reconnect-debug-panel {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 100001;
    background: #1a2a3a;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.reconnect-debug-panel .debug-title {
    font-size: 10px;
    font-weight: 700;
    color: #5a8abb;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.reconnect-debug-panel button {
    display: block;
    width: 100%;
    padding: 6px 12px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #c8d6e5;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    transition: all 0.1s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.reconnect-debug-panel button:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.reconnect-debug-panel button:last-child {
    margin-bottom: 0;
}
