/* 
 * BX Tools: Foes & Fortunes - Phase 2 Additions
 * Extends bxTools.css with data management specific styles
 */

/* ============================================
   Multi-Select Dropdowns with Checkboxes
   ============================================ */

select[multiple] {
    height: auto;
    min-height: 38px;
    padding: 6px;
}

select[multiple] option {
    padding: 4px 8px;
    cursor: pointer;
}

select[multiple] option:hover {
    background-color: #e0f2f7;
}

/* ============================================
   Validation & Error Messages
   ============================================ */

.validation-errors {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.validation-errors h4 {
    color: #856404;
    margin-bottom: 10px;
}

.validation-errors ul {
    margin-left: 20px;
    color: #856404;
}

.validation-errors ul li {
    margin-bottom: 5px;
}

/* ============================================
   Import/Export Status Messages
   ============================================ */

.import-status {
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    border: 2px solid;
}

.import-status.success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.import-status.warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.import-status.error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* ============================================
   Monster Table Enhancements
   ============================================ */

.monster-enabled-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.monster-enabled-indicator.enabled {
    background-color: #16a34a;
}

.monster-enabled-indicator.disabled {
    background-color: transparent;
    border: 2px solid #6b7280;
}

/* ============================================
   Data Management Section
   ============================================ */

.data-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #219fcd;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #219fcd;
}

.stat-card .stat-label {
    color: #6b7280;
    font-size: 0.9rem;
}

/* ============================================
   Edit Form - Calculated Fields
   ============================================ */

input:disabled,
textarea:disabled,
select:disabled {
    background-color: #f0f9fc !important;
    color: #6b7280;
    cursor: not-allowed;
}

/* ============================================
   Loading States
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.loading-spinner::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #b3e0f0;
    border-top-color: #219fcd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   Validation Icons
   ============================================ */

.validation-icon {
    display: inline-block;
    margin-left: 5px;
    font-size: 1.2rem;
}

.validation-icon.valid::before {
    content: '✓';
    color: #16a34a;
}

.validation-icon.invalid::before {
    content: '✗';
    color: #dc2626;
}

.validation-icon.warning::before {
    content: '⚠';
    color: #ffc107;
}

/* ============================================
   Monster Count Badge
   ============================================ */

.monster-count-badge {
    background-color: #219fcd;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 8px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .data-stats {
        grid-template-columns: 1fr;
    }
    
    select[multiple] {
        font-size: 14px;
    }
}
