﻿/* =========================================================
   Time Attendance — Creative loading screen
   Animated analog clock + pulse rings + shimmering brand
   Designed to match the dark Radzen theme & app blues.
   ========================================================= */

.ta-loader-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 30%, #1f3a5f 0%, #0b1a2e 55%, #050a14 100%);
    z-index: 9999;
    overflow: hidden;
    font-family: 'Helvetica Neue', Tahoma, Helvetica, Arial, sans-serif;
}

/* Subtle rotating ambient glow behind everything */
.ta-loader-screen::before {
    content: '';
    position: absolute;
    inset: -50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(0, 113, 193, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 75% 70%, rgba(0, 200, 255, 0.12) 0%, transparent 50%);
    animation: ta-bg-drift 18s linear infinite;
    pointer-events: none;
}

@keyframes ta-bg-drift {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ta-loader {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

/* ---------- Clock + pulsing rings ---------- */
.ta-clock {
    position: relative;
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Three concentric pulsing rings (the &::before/&::after give us the extras) */
.ta-clock-ring,
.ta-clock-ring::before,
.ta-clock-ring::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(0, 200, 255, 0.45);
    box-sizing: border-box;
    animation: ta-pulse 2.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.ta-clock-ring::before { animation-delay: 0.8s; }
.ta-clock-ring::after  { animation-delay: 1.6s; }

@keyframes ta-pulse {
    0%   { transform: scale(0.55); opacity: 0.85; }
    100% { transform: scale(1.45); opacity: 0; }
}

/* Clock face */
.ta-clock-face {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #1e3a5f 0%, #0d1f33 70%, #07131f 100%);
    border: 3px solid #0071c1;
    box-shadow:
        0 0 35px rgba(0, 173, 255, 0.55),
        0 0 80px rgba(0, 113, 193, 0.25),
        inset 0 0 22px rgba(0, 0, 0, 0.65);
}

/* Tick marks at 12/3/6/9 */
.ta-tick {
    position: absolute;
    width: 3px;
    height: 12px;
    background: #00c8ff;
    border-radius: 2px;
    left: 50%;
    top: 6px;
    margin-left: -1.5px;
    transform-origin: 50% 64px;
    box-shadow: 0 0 6px rgba(0, 200, 255, 0.7);
}

.ta-tick-12 { transform: rotate(0deg); }
.ta-tick-3  { transform: rotate(90deg); }
.ta-tick-6  { transform: rotate(180deg); }
.ta-tick-9  { transform: rotate(270deg); }

/* Clock hands — pinned to center via bottom:50% + transform-origin */
.ta-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: 50% 100%;
    border-radius: 4px;
}

.ta-hand-hour {
    width: 5px;
    height: 32px;
    margin-left: -2.5px;
    background: linear-gradient(180deg, #ffffff, #d4ecff);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    animation: ta-rotate 8s linear infinite;
}

.ta-hand-minute {
    width: 3px;
    height: 48px;
    margin-left: -1.5px;
    background: linear-gradient(180deg, #00c8ff, #0071c1);
    box-shadow: 0 0 8px rgba(0, 200, 255, 0.85);
    animation: ta-rotate 2s linear infinite;
}

.ta-hand-second {
    width: 2px;
    height: 56px;
    margin-left: -1px;
    background: #ff6a3d;
    box-shadow: 0 0 6px rgba(255, 106, 61, 0.9);
    animation: ta-rotate 1s steps(60, end) infinite;
}

@keyframes ta-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Center cap */
.ta-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #00c8ff 80%);
    box-shadow: 0 0 10px rgba(0, 200, 255, 1);
    z-index: 3;
}

/* ---------- Brand text ---------- */
.ta-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.ta-brand-text {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #0071c1 0%, #00c8ff 50%, #0071c1 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: ta-shimmer 2.5s linear infinite;
}

@keyframes ta-shimmer {
    from { background-position: 200% center; }
    to   { background-position: -200% center; }
}

.ta-brand-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 2px;
}

/* ---------- Bouncing dots ---------- */
.ta-dots {
    display: flex;
    gap: 10px;
}

.ta-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00c8ff;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.85);
    animation: ta-bounce 1.2s ease-in-out infinite;
}

.ta-dots span:nth-child(2) { animation-delay: 0.15s; }
.ta-dots span:nth-child(3) { animation-delay: 0.3s;  }

@keyframes ta-bounce {
    0%, 80%, 100% { transform: translateY(0);    opacity: 0.4; }
    40%           { transform: translateY(-14px); opacity: 1;   }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ta-loader-screen::before,
    .ta-clock-ring,
    .ta-clock-ring::before,
    .ta-clock-ring::after,
    .ta-hand-hour,
    .ta-hand-minute,
    .ta-hand-second,
    .ta-brand-text,
    .ta-dots span {
        animation: none;
    }
}
