/* Admin Org Chart Styles */

.admin-org-chart-container {
    width: 100%;
    height: 600px;
    background: #fafafa;
    border-radius: 4px;
}

/* Node Card */
.admin-node-card {
    background: white;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.admin-node-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Position colors */
.admin-node-card.leg-left {
    border-left: 4px solid #4caf50;
}

.admin-node-card.leg-right {
    border-left: 4px solid #ff9800;
}

.admin-node-card.leg-root {
    border-left: 4px solid #1976d2;
}

/* Club status */
.admin-node-card.club-active {
    border-top: 2px solid #4caf50;
}

.admin-node-card.club-inactive {
    border-top: 2px solid #e0e0e0;
    opacity: 0.85;
}

/* Node header */
.admin-node-card .node-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-node-card .node-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.admin-node-card.leg-left .node-avatar {
    background: linear-gradient(135deg, #388e3c 0%, #66bb6a 100%);
}

.admin-node-card.leg-right .node-avatar {
    background: linear-gradient(135deg, #f57c00 0%, #ffb74d 100%);
}

.admin-node-card .node-main-info {
    flex: 1;
    min-width: 0;
}

.admin-node-card .node-name {
    font-weight: 600;
    font-size: 12px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.admin-node-card .node-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.admin-node-card .level-badge {
    background: #e3f2fd;
    color: #1976d2;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.admin-node-card .leg-text-left {
    color: #4caf50;
    font-size: 10px;
    font-weight: 500;
}

.admin-node-card .leg-text-right {
    color: #ff9800;
    font-size: 10px;
    font-weight: 500;
}

/* Node footer */
.admin-node-card .node-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
    font-size: 10px;
}

.admin-node-card .club-status {
    font-weight: 500;
}

.admin-node-card .club-status.club-active {
    color: #4caf50;
}

.admin-node-card .club-status.club-inactive {
    color: #9e9e9e;
}

.admin-node-card .activation-date {
    color: #757575;
    font-size: 9px;
}

/* Week badge */
.admin-node-card .week-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
}

.admin-node-card .week-badge.week-match {
    background: #4caf50;
    color: white;
}

.admin-node-card .week-badge.week-other {
    background: #ff5722;
    color: white;
}

/* Week filter disabled state */
.admin-node-card.week-disabled {
    opacity: 0.35;
    filter: grayscale(80%);
    transform: scale(0.95);
    box-shadow: none;
    border-color: #e0e0e0 !important;
}

.admin-node-card.week-disabled:hover {
    opacity: 0.5;
    transform: scale(0.97);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.admin-node-card.week-disabled .node-avatar {
    background: #bdbdbd !important;
}

.admin-node-card.week-disabled .node-name {
    color: #9e9e9e;
}

.admin-node-card.week-disabled .club-status {
    color: #bdbdbd !important;
}

/* Target week highlight (sparkle badge) */
.admin-node-card .target-week-highlight {
    position: absolute;
    top: -12px;
    left: -12px;
    font-size: 18px;
    animation: pulse-highlight 1.5s ease-in-out infinite;
}

@keyframes pulse-highlight {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* Enhanced styling for target week nodes */
.admin-node-card:not(.week-disabled) {
    /* Normal nodes when filter is active get subtle enhancement */
}

/* When week filter is active, make matching nodes stand out more */
.admin-node-card.leg-left:not(.week-disabled),
.admin-node-card.leg-right:not(.week-disabled) {
    /* These will naturally stand out against disabled ones */
}

/* Expand button */
.admin-expand-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1976d2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.admin-expand-btn:hover {
    background: #1565c0;
}

/* Messages */
.admin-org-chart-container .no-data-message,
.admin-org-chart-container .error-message {
    padding: 40px;
    text-align: center;
    color: #666;
}

/* RTL support */
[dir="rtl"] .admin-node-card {
    border-left: none;
    border-right: 4px solid #e0e0e0;
}

[dir="rtl"] .admin-node-card.leg-left {
    border-right-color: #4caf50;
}

[dir="rtl"] .admin-node-card.leg-right {
    border-right-color: #ff9800;
}

[dir="rtl"] .admin-node-card.leg-root {
    border-right-color: #1976d2;
}

[dir="rtl"] .admin-node-card .week-badge {
    right: auto;
    left: -8px;
}
