/* Delegation CSS - Styling for delegation display */

/* Main container */
.delegation-container {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.delegation-container.active {
    opacity: 1;
    transform: translateY(0);
}

/* Title styling */
.delegation-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* Summary section */
.delegation-summary {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.delegation-totals {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.delegation-total {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.delegation-total h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.delegation-total p {
    font-size: 16px;
    margin: 5px 0;
}

.delegation-total.incoming {
    background-color: #e6f7ff;
    border: 1px solid #bae7ff;
}

.delegation-total.outgoing {
    background-color: #fff7e6;
    border: 1px solid #ffe7ba;
}

/* Delegation sections */
.delegation-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.delegation-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #444;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Delegation lists */
.delegation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delegation-item {
    display: flex;
    flex-wrap: wrap;
    background-color: #fafafa;
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

.delegation-item:hover {
    background-color: #f0f0f0;
}

.delegation-user {
    flex: 1;
    font-weight: 600;
    color: #1a6aff;
}

.delegation-amount {
    flex: 1;
    font-weight: 600;
    color: #1a8b1a;
    text-align: center;
}

.delegation-date {
    flex: 2;
    color: #666;
    text-align: right;
    font-size: 14px;
}

/* Loading and error states */
.delegation-loading, .delegation-error {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

.delegation-error {
    color: #d9534f;
}

.no-delegations {
    text-align: center;
    color: #777;
    padding: 15px;
    font-style: italic;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .delegation-totals {
        flex-direction: column;
        gap: 15px;
    }
    
    .delegation-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .delegation-user, .delegation-amount, .delegation-date {
        text-align: left;
    }
    
    .delegation-date {
        font-size: 12px;
        color: #888;
    }
}

/* Toggle button in balance-toggle container */
.balance-toggle {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.toggle-button {
    background-color: #1a6aff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.toggle-button:hover {
    background-color: #0055e6;
} 

/* Notes about API limitations */
.delegation-note {
    font-size: 12px;
    color: #ff9800;
    font-style: italic;
    margin-top: 8px;
}

.delegation-api-note {
    font-size: 13px;
    color: #ff9800;
    font-style: italic;
    padding: 10px;
    background-color: #fff8e1;
    border-left: 3px solid #ffb74d;
    margin-bottom: 15px;
    border-radius: 4px;
}

/* Unknown delegator styling */
.delegation-item.unknown-delegator {
    background-color: #fffaf0;
    border-left: 3px solid #ff9800;
}

.unknown-delegator .delegation-user {
    color: #ff9800;
}

/* Total delegations styling */
.delegation-item.total-delegator {
    background-color: #e6f7ff;
    border-left: 3px solid #1a6aff;
    font-weight: bold;
}

.total-delegator .delegation-user {
    color: #1a6aff;
    font-size: 1.05em;
}

.total-delegator .delegation-amount {
    color: #1a6aff;
}

/* Ensure adequate spacing between sections */
.delegation-section {
    margin-bottom: 30px;
}

.delegation-section:last-child {
    margin-bottom: 10px;
} 