/* 
 * Shared Components CSS
 * Consistent styles for reusable UI components across EdenHub Assets
 */

/* ========== Cards ========== */
.eh-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-bs-theme="light"] .eh-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.eh-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.eh-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

[data-bs-theme="light"] .eh-card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.eh-card-body {
    padding: 1.25rem;
}

/* ========== Badges ========== */
.eh-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.eh-badge-primary {
    background: rgba(13, 110, 253, 0.15);
    color: #3d8bfd;
    border: 1px solid rgba(13, 110, 253, 0.3);
}

.eh-badge-success {
    background: rgba(25, 135, 84, 0.15);
    color: #2dce89;
    border: 1px solid rgba(25, 135, 84, 0.3);
}

.eh-badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.eh-badge-danger {
    background: rgba(220, 53, 69, 0.15);
    color: #f5365c;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.eh-badge-info {
    background: rgba(13, 202, 240, 0.15);
    color: #11cdef;
    border: 1px solid rgba(13, 202, 240, 0.3);
}

.eh-badge-secondary {
    background: rgba(108, 117, 125, 0.15);
    color: #8898aa;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

/* ========== Blueprint ME/TE Research Status ========== */
.bp-research-none {
    background: rgba(220, 53, 69, 0.15);
    color: #f5365c;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.bp-research-partial {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.bp-research-complete {
    background: rgba(25, 135, 84, 0.15);
    color: #2dce89;
    border: 1px solid rgba(25, 135, 84, 0.3);
}

/* ========== Tables ========== */
.eh-table {
    width: 100%;
    border-collapse: collapse;
}

.eh-table thead th {
    padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    text-align: left;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8898aa;
}

[data-bs-theme="light"] .eh-table thead th {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.eh-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease;
}

[data-bs-theme="light"] .eh-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.eh-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

[data-bs-theme="light"] .eh-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.eh-table tbody td {
    padding: 1rem;
}

/* ========== Empty States ========== */
.eh-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.eh-empty-state-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.eh-empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.eh-empty-state-text {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.eh-empty-state-action {
    margin-top: 1rem;
}

/* ========== Loaders ========== */
.eh-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.eh-loader-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.eh-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 10;
}

/* Skeleton loader */
.eh-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: eh-skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.25rem;
}

[data-bs-theme="light"] .eh-skeleton {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.05) 25%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.05) 75%
    );
    background-size: 200% 100%;
}

@keyframes eh-skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.eh-skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.eh-skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
    width: 60%;
}

.eh-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* ========== Status Indicators ========== */
.eh-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.eh-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.eh-status-dot-success {
    background: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.eh-status-dot-warning {
    background: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.eh-status-dot-danger {
    background: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.eh-status-dot-info {
    background: #17a2b8;
    box-shadow: 0 0 0 2px rgba(23, 162, 184, 0.2);
}

.eh-status-dot-secondary {
    background: #6c757d;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

/* ========== List Groups ========== */
.eh-list-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.eh-list-group-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.375rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-bs-theme="light"] .eh-list-group-item {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.eh-list-group-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .eh-list-group-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ========== Refresh/Status Strip ========== */
.eh-status-strip {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.eh-status-strip-info {
    background: rgba(13, 202, 240, 0.1);
    border-color: #0dcaf0;
}

.eh-status-strip-success {
    background: rgba(25, 135, 84, 0.1);
    border-color: #198754;
}

.eh-status-strip-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.eh-status-strip-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
}

/* ========== Stat Cards ========== */
.eh-stat-card {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-bs-theme="light"] .eh-stat-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.eh-stat-card-content {
    flex: 1;
}

.eh-stat-card-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.eh-stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.eh-stat-card-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* ========== Intelligence Page Styles ========== */
.bg-purple {
    background-color: #6f42c1 !important;
}

.bg-darker {
    background-color: #1a1d20 !important;
}
