/* ===========================
   CLASSIC ENTERPRISE THEME
   =========================== */

/* Technical Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-app); border-left: 1px solid var(--border-color); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: var(--radius-base); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Log viewer scrollbar */
.log-scroll::-webkit-scrollbar { width: 5px; }
.log-scroll::-webkit-scrollbar-track { background: transparent; }
.log-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 6px; }
.log-scroll::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Per-entry copy button: hidden until row is hovered */
.log-entry-copy { opacity: 0; transition: opacity 0.1s; }
.log-entry:hover .log-entry-copy { opacity: 1; }

/* Spinner */
.loader {
    border: 2px solid rgba(0,0,0,0.1); border-radius: 50%; border-top: 2px solid var(--primary-color);
    width: 16px; height: 16px; animation: spin 1s linear infinite; display: inline-block;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Fade in/out animations */
.fade-in { animation: fadeIn 0.2s ease-in-out; }
.fade-out { animation: fadeOut 0.4s ease-in forwards; opacity: 1; pointer-events: none; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut { to { opacity: 0; transform: scale(0.95); margin-top: -100px; } }

/* Loading Text Fade */
.fade-text { transition: opacity 0.5s ease-in-out; }

/* Bounce animation for loader icon */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(-8%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}
.animate-bounce-slow { animation: bounce-slow 2s infinite; }

/* Loading bar animation */
@keyframes loading-bar {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 70%; margin-left: 30%; }
    100% { width: 0%; margin-left: 100%; }
}
.animate-loading-bar { animation: loading-bar 2s ease-in-out infinite; }

/* Range Slider Styling */
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%;
    background: var(--primary-color); cursor: pointer; margin-top: -6px; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; cursor: pointer; background: #e5e7eb; border-radius: 2px;
}
input[type=range]:focus { outline: none; }

/* Timeline connector lines */
.timeline-connector::before {
    content: ''; position: absolute; top: 24px; bottom: -10px; left: 14px;
    width: 2px; background: #e5e7eb; z-index: 0;
}
.timeline-connector:last-child::before { display: none; }

.timeline-line::before {
    content: ''; position: absolute; top: 24px; bottom: -24px; left: 20px;
    width: 2px; background: #e5e7eb; z-index: 0;
}
.last-item::before { display: none; }

/* Sharp Status Badge */
.status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid currentColor;
}
.status-rel { background-color: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.status-iw  { background-color: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.status-frz { background-color: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.status-obs { background-color: #f5f5f4; color: #57534e; border: 1px solid #d6d3d1; }

/* Approval Status Badges */
.status-approval-draft    { background-color: #f5f5f4; color: #57534e; border: 1px solid #d6d3d1; }
.status-approval-pending  { background-color: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.status-approval-approved { background-color: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.status-approval-rejected { background-color: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Drawer transition */
.drawer { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: -4px 0 24px rgba(0,0,0,0.08); }

/* Drag and Drop Active State */
.dragover {
    border-color: var(--primary-color) !important;
    background-color: #eff6ff !important;
}

/* Custom Radio Buttons */
.radio-peer:checked + div {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Hide scrollbar utility */
.scrollbar-none { scrollbar-width: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }
