/* Модальное окно списка рефералов */
.referrals-list-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.referrals-list-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.referrals-list-modal {
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.referrals-list-modal-overlay.active .referrals-list-modal {
    transform: scale(1);
}

.referrals-list-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.referrals-list-modal-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 600;
}

.referrals-list-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.referrals-list-modal-close:hover {
    opacity: 0.7;
}

.referrals-list-modal-close svg {
    width: 24px;
    height: 24px;
}

/* Статистика */
.referrals-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.referrals-stat-value {
    color: #0f172a;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 600;
}

.referrals-stat-label {
    color: #64748b;
    font-size: 12px;
}

/* Список рефералов */
.referrals-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referrals-empty {
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
}

.referrals-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.2;
}

.referrals-empty-icon svg {
    width: 100%;
    height: 100%;
}

.referrals-empty p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.referral-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
}

.referral-item:hover {
    transform: translateY(-1px);
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
}

.referral-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #e2e8f0;
}

.referral-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.referral-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.referral-name {
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 600;
}

.referral-date {
    color: #64748b;
    font-size: 12px;
}

.referral-earnings {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.referral-earnings-total {
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
}

.referral-earnings-hour {
    color: #64748b;
    font-size: 11px;
}

/* Статус реферала */
.referral-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.referral-status.active {
    background-color: #dcfce7;
    color: #166534;
}

.referral-status.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.referral-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

/* Футер модального окна */
.referrals-list-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.referrals-copy-link-btn {
    flex: 1;
    background-color: #64748b;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.referrals-copy-link-btn:hover {
    background-color: #475569;
}

.referrals-copy-link-btn svg {
    width: 16px;
    height: 16px;
}

/* Custom Scrollbar */
.referrals-list-body::-webkit-scrollbar {
    width: 6px;
}

.referrals-list-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.referrals-list-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.referrals-list-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Touch scroll improvements */
.referrals-list-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
