/* ===========================================================================
   BlueBotData Component Library
   =========================================================================== 
   Standardized CSS patterns for consistent UI across all templates.
   Import this after Tailwind CDN in base.html
   =========================================================================== */

/* ===========================================================================
   CARDS
   =========================================================================== */

/* Glass Card - Primary container component */
.card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    transition: all 0.4s ease;
}

.card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Minimal Card - Less prominent */
.card-subtle {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.05);
    border-radius: 12px;
}

/* ===========================================================================
   BUTTONS
   =========================================================================== */

/* Primary Button - Cyan accent */
.btn-primary {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button - Outline style */
.btn-secondary {
    background: transparent;
    color: #06b6d4;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(6, 182, 212, 0.5);
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: #06b6d4;
}

/* Danger Button - Red actions */
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

/* Ghost Button - Minimal */
.btn-ghost {
    background: transparent;
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, 0.1);
    color: white;
}

/* Icon Button - Square, icon-only */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.1);
    border: none;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
}

/* ===========================================================================
   FORMS
   =========================================================================== */

/* Input Field */
.input {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    width: 100%;
}

.input:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.input::placeholder {
    color: #64748b;
}

/* Select Dropdown */
.select {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25rem;
}

.select:focus {
    outline: none;
    border-color: #06b6d4;
}

/* Form Label */
.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

/* ===========================================================================
   TABLES
   =========================================================================== */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.05);
}

.table tr:hover {
    background: rgba(6, 182, 212, 0.05);
}

/* ===========================================================================
   STATUS INDICATORS
   =========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.badge-warning {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.badge-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-info {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.badge-neutral {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

/* Status Dots */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-running {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.status-stopped {
    background: #64748b;
}

.status-error {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

/* ===========================================================================
   LAYOUT UTILITIES
   =========================================================================== */

/* Glass backgrounds */
.glass {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Accent glow effect */
.accent-glow {
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.accent-glow:hover {
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

/* Section divider */
.divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.1);
    margin: 1.5rem 0;
}

/* ===========================================================================
   ANIMATIONS
   =========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-pulse-slow {
    animation: pulse-slow 2s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===========================================================================
   LOADING STATES
   =========================================================================== */

.skeleton {
    background: linear-gradient(90deg, 
        rgba(148, 163, 184, 0.1) 25%, 
        rgba(148, 163, 184, 0.2) 50%, 
        rgba(148, 163, 184, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
